Last modified: 2014-02-12 23:53:59 UTC
Right now, the MobileFrontend has hard-coded values for WMF caching infrastructure. These should be made configurable.
I believe varnish is configured to pretend that "Host: en.wikipedia.org" when in reality it's "Host: en.m.wikipedia.org". I'd like to see that dropped and have MobileFrontend explicitly test to see if it's on the mobile site. WURFL is included into MobileFrontend. Perhaps some more work on that should be done so that WURFL can be used inside Varnish, and also inside php as a fallback. It would also be nice for one version of the mobile device redirection from the desktop to mobile version to be built-in to MobileFrontend.
(In reply to comment #1) > I believe varnish is configured to pretend that "Host: en.wikipedia.org" when > in reality it's "Host: en.m.wikipedia.org". This is not exactly the case, but close. > > I'd like to see that dropped and have MobileFrontend explicitly test to see if > it's on the mobile site. We don't want to go past the caching layer for this test. > > WURFL is included into MobileFrontend. Perhaps some more work on that should be > done so that WURFL can be used inside Varnish, and also inside php as a > fallback. We are working on integrating WURFL or something similar into the caching layer. > > It would also be nice for one version of the mobile device redirection from the > desktop to mobile version to be built-in to MobileFrontend. It is currently built-in you just need to change a few things like in this gist: https://raw.github.com/gist/1590648/86abdf93a99876c609862b28f8dae1b488bded03/MobileFrontend.php But, I agree it should be streamlined and made consistant throughout implementations.
(In reply to comment #2) > (In reply to comment #1) > > I believe varnish is configured to pretend that "Host: en.wikipedia.org" when > > in reality it's "Host: en.m.wikipedia.org". > > This is not exactly the case, but close. > > > > > I'd like to see that dropped and have MobileFrontend explicitly test to see if > > it's on the mobile site. > > We don't want to go past the caching layer for this test. I mean I want MobileFrontend to test for en.m.wikipedia.org for assertion that it's on the mobile domain instead of testing for X-Device which will only be set by varnish. They have the same caching implications. > > > > WURFL is included into MobileFrontend. Perhaps some more work on that should be > > done so that WURFL can be used inside Varnish, and also inside php as a > > fallback. > > We are working on integrating WURFL or something similar into the caching > layer. > > > > > It would also be nice for one version of the mobile device redirection from the > > desktop to mobile version to be built-in to MobileFrontend. > > It is currently built-in you just need to change a few things like in this > gist: > https://raw.github.com/gist/1590648/86abdf93a99876c609862b28f8dae1b488bded03/MobileFrontend.php > > But, I agree it should be streamlined and made consistant throughout > implementations.
Maybe we can embed wurfl in varnish? (see http://www.enrise.com/2011/02/mobile-device-detection-with-wurfl-and-varnish/ for a lousy example)
WURFL related stuff brought up in these comments is outside the scope of the issue initially raised - the fact that there are hard-coded values for WMF caching infrastructure in the MobileFrontend code. This should now be resolved in r111689.
(In reply to comment #5) > WURFL related stuff brought up in these comments is outside the scope of the > issue initially raised - the fact that there are hard-coded values for WMF > caching infrastructure in the MobileFrontend code. This should now be resolved > in r111689. I forgot to mention - please feel free to open up a new bug or new bugs for the other issues mentioned in the above comments.
This is now fixed as of r111746. — Patrick