Last modified: 2014-02-12 23:46:13 UTC
If FirefoxOS lies and sends a user agent with "Android" in the title, we get the mobile site. If we remove "Android", we get the desktop site. Can we encourage you to detect mobile browsers using a more robust algorithm? :-) The recommended method is to use the string "Mobi", which will detect Firefox, Chrome, Android default, Mobile IE and Mobile Opera. We would very much appreciate this being fixed as soon as possible. At the moment, we may have to send a hacked user agent string to get Wikipedia to work correctly. This is https://bugzilla.mozilla.org/show_bug.cgi?id=799881 Thanks, Gerv
I am wondering what is the new user-agent ?
Why do you need to know? Please, please, please don't do mobile browser detection by detecting entire user agents. That might make this mobile browser work, but it will just break for the next one, and the next. There is general consensus among mobile browsers that their UAs contain the string "Mobile". (Although for Opera, for historical reasons, it's "Mobi", hence the suggestion to detect "Mobi".) If you have to do user-agent based switching between mobile and desktop sites, then please use this detection method rather than detecting whole user agent strings. Gerv
I am just triaging bugs and though that knowing the user agent would help (even if it is just obvious that it contains the 'Mobi' string.
Pinged MaxSem on IRC to have a look at it. According to http://lawrencemandel.com/2012/07/27/decision-made-firefox-os-user-agent-string/ the user agent for Firefox under FirefoxOS is: Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 Whereas under Android it would be either: Mozilla/5.0 (Android; Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 Mozilla/5.0 (Android; Tablet; rv:14.0) Gecko/14.0 Firefox/14.0
That is correct :-) Although of course the "14.0" changes each release. BTW, don't rely on that "Tablet" token - it may go away. Gerv
Note that if we change the detection to check for 'Mobi' or 'Mobile', it should also blacklist 'iPad' so we keep sending iPads to the full desktop site. At least until our mobile interface kicks enough ass that people feel comfortable using it on larger screens. :)
(In reply to comment #6) > Note that if we change the detection to check for 'Mobi' or 'Mobile', it should > also blacklist 'iPad' so we keep sending iPads to the full desktop site. > .. because of "Mobile Safari" in those user agents.
Should be fixed alongside related bug 40513
Mmm This is a little weird. It should pick up Firefox in the user agent... I suspect there is something wrong in the varnish config: https://gerrit.wikimedia.org/r/gitweb?p=operations/puppet.git;a=blob;f=templates/varnish/mobile-frontend.inc.vcl.erb However in the process of investigating this I noticed that Fennec doesn't redirect either. Test here: https://gerrit.wikimedia.org/r/31581
Related: bug 40513. Looks like all that is needed for this is to add: acl mobile browser -i mobi to /home/wikipedia/conf/squid/mobile_acls.conf It requires root privileges and not puppetized, so adding Asher.
I'm reluctant to push this during the fundraiser, esp. since we have no FR banners on the mobile site. Brion already found a use case where just "mobi" is unsuitable for this and I'm unsure if there are other such cases too. I'm not saying no, but let's have more eyes/sign-off from more people for this, at least in this particular time period.
Mozilla is currently recommending detecting mobile browsers by looking for "Mobi", so we would be very interested in any information which suggests that this is not optimal so we can adjust our advice... Can you pass it on? Thanks :-) Gerv
Over on bug 40513 we've also just discovered that /home/wikipedia/conf/squid/mobile_acls.conf is the secret place this is hiding. I recommend going ahead and adding a 'mobi' line. We already have exclusions for 'iPad' which is the only known problem case.
This was just deployed. Please confirm that the iPad exceptions work. It'd be also nice to clean up that list for now redundant entries, feel free to letting us know which of them can be removed.
Confirmed fixed -- es.wikipedia.org and sr.wikipedia.org now redirect to mobile view in Boot2Gecko desktop simulator's browser. Thanks!
....aaaaand confirmed that iPad still gets desktop site.