Page MenuHomePhabricator

MobileFrontend extension should not be tied to WMF caching infrastructure
Closed, ResolvedPublic

Description

Right now, the MobileFrontend has hard-coded values for WMF caching infrastructure. These should be made configurable.


Version: unspecified
Severity: normal

Details

Reference
bz34145
TitleReferenceAuthorSource BranchDest Branch
Add temporary debug output for T361459repos/phabricator/phabricator!38aklapperdebugT361459wmf/stable
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:16 AM
bzimport set Reference to bz34145.
bzimport added a subscriber: Unknown Object (MLST).

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.

preilly wrote:

(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.

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.

preilly wrote:

This is now fixed as of r111746.

— Patrick