Page MenuHomePhabricator

Galaxy S2/Android/Firefox not automatically redirected to en.m.wikipedia.org
Closed, ResolvedPublic

Description

We are talking about a Galaxy S2 phone running Android 2.3.3 and mobile Firefox 6. When accessing en.wikipedia.org, it doesn't get automatically redirected to en.m.wikipedia.org. (I was not logged into Wikipedia at the time.) I tried http://en.wikipedia.org/wiki/Wikipedia:Enable_mobile_version without success.

User-agent: Mozilla/5.0 (Android; Linux armv7l; rv:6.0) Gecko/20110713 Firefox/6.0 Fennec/6.02011-07-17 14:50:19


Version: .5
Severity: normal
OS: Linux
Platform: Other

Details

Reference
bz29952

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:33 PM
bzimport set Reference to bz29952.
bzimport added a subscriber: Unknown Object (MLST).

Short answer: Firefox for Android's user-agent string doesn't distinguish between 'mobile phone' and larger-screen devices, eg 'tablet', where we prefer to show the full site by default.

So the current redirection script that checks user-agent can't determine if it should redirect or not, and the faster server-side redirection being put in place won't be able to handle this in any way unless future versions of Firefox for Android send some sort of HTTP header data to distinguish phones from tablets/netbooks/laptops.

As a temporary workaround, I propose updating the client-side JavaScript redirector to use CSS media queries or such to detect very-small-screen Firefox and do the redirection then; the faster server-side user-agent can still work for other browsers.

(In reply to comment #2)

Short answer: Firefox for Android's user-agent string doesn't distinguish
between 'mobile phone' and larger-screen devices, eg 'tablet', where we prefer
to show the full site by default.

So the current redirection script that checks user-agent can't determine if it
should redirect or not, and the faster server-side redirection being put in
place won't be able to handle this in any way unless future versions of Firefox
for Android send some sort of HTTP header data to distinguish phones from
tablets/netbooks/laptops.

As a temporary workaround, I propose updating the client-side JavaScript
redirector to use CSS media queries or such to detect very-small-screen Firefox
and do the redirection then; the faster server-side user-agent can still work
for other browsers.

And its still the same with all newer firefox builds. Patrick, Axel, and I chatted on #wikimedia-mobile and eventually came up with the same conclusion of css media queries. Thanks for detailed write up Brion. Its important to capture our thoughts not only on irc but also in bugzilla.

Just testing Bugzilla tools (not the spammer)

  • This bug has been marked as a duplicate of bug 25932 ***