Last modified: 2014-02-12 23:45:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37842, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35842 - MobileFrontend breaks frontend caching in some cases
MobileFrontend breaks frontend caching in some cases
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Asher Feldman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-10 00:25 UTC by Asher Feldman
Modified: 2014-02-12 23:45 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Asher Feldman 2012-04-10 00:25:45 UTC
The presence of a "useformat=desktop" cookie disables squid caching for the regular site.

I think this has to do with the way X-V-O is implemented.  And if caching became possible when that cookie set, it would be varied upon and we'd have to cache two desktop-format copies of every page (with useformat=desktop and without.)  

Instead of setting useformat=desktop, delete the cookie when switching to the desktop view. 

Then, a cookie that isn't used for varying needs to be set that's just used for disabling the squid level mobile redirector, so set the old stopMobileRedirect=true cookie at the same time.  It's still in the squid config so this can be fixed without ops involvement.
Comment 1 Arthur Richards 2012-04-12 00:28:54 UTC
Fix for this:
https://gerrit.wikimedia.org/r/#change,4761
Comment 2 Arthur Richards 2012-04-12 19:03:21 UTC
The fix I created seems to work fine for sites that use MobileFrontend on a domain separate from their desktop site (like we do for most sites on the WMF cluster).

However, for single-domain sites, there are still issues around browser caching that I have not yet been able to sort out. Some browsers seem to handle the view switching with the cookies just fine (FF on OS X, IE 9 on Vista), but other browsers (Safari [iOS, OS X], Chrome [OS X], Android native browser, Dolphin HD) do not. When you toggle your view preference in these browsers and then surf to a page that had been viewed recently in the previous view, you will likely see a cached copy of the wrong version of the page.

In Chrome, this often seems to happen when the browser requests a resource but gets an HTTP 304 status back. Safari, on the other hand, seems to display this behavior even with HTTP 200 status.

An easy way out of this predicament is to simply say that sites using MF will need to set up a separate mobile domain until we figure out mobile-specific paths in the URLs. Otherwise, I'm totally stumped and not sure how to resolve this issue - any help is greatly appreciated.

(In reply to comment #1)
> Fix for this:
> https://gerrit.wikimedia.org/r/#change,4761
Comment 3 Arthur Richards 2012-05-02 19:40:08 UTC
Asher, since the cookie handling changes have been deployed, are we still experiencing the issue you brought up here with frontend caching?
Comment 4 Jon 2012-06-01 11:43:57 UTC
bump
Comment 5 Jon 2012-09-04 18:43:56 UTC
Closing due to lack of activity.
Comment 6 Asher Feldman 2012-09-04 20:21:10 UTC
There are still issues that result in the mobile cache hitrate being considerably less than squids, but they are fundamental to the way we currently have to vary on so many factors in mobile.  Patrick has discussed utilizing ESI to eliminate all of the various per-device and service (zero per-carrier) variances, and that would fix it.  If Patrick doesn't have time to implement ESI before transitioning off the mobile team, someone else should pick this up.
Comment 7 Jon 2012-09-05 00:28:58 UTC
I'll reopen then. Who would be suitable to pick this up?
Comment 8 Tomasz Finc 2012-09-07 07:07:29 UTC
Get Arthur to put this into our backlog and we can prioritize it.
Comment 9 Jon 2012-09-21 20:38:19 UTC
I've put this in the backlog to get fleshed out. Please can someone flesh out this story to clearly articulate the outcomes:
https://mingle.corp.wikimedia.org/projects/wlm_android_app/cards/237

I'm not sure bugzilla is the right place for this as it's not 100% clear currently how this should be done and what the outcomes should be.
Comment 10 Arthur Richards 2013-04-09 20:44:20 UTC
I'm closing this issue since the orignal posted problem has been resolved. Improving the mobile cache hit rate is a separate from 'breaking frontend caching', and is already actively being worked on as an enhancement: https://mingle.corp.wikimedia.org/projects/mobile/cards/446

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links