Weird, I thought the user agent for mobile browsers was labeled as such. But for my tablet at whatsmyuseragent.com I’m just seeing “Mozilla/5.0 (Linux; Android 4.4.2; U25GT-C4WB Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Safari/5.37.36”. Quite ambiguous.
I’m not a developer, but would it be possible to:
- Check for the presence of the word “Android” in the user agent and always offer the mobile version if present? It’s a pretty safe bet that most Android users are on a smaller screen.
- Check the browser window size and offer the mobile version by default below certain parameters. The above mentioned whatsmyuseragent.com was able to correctly detect my screen resolution and browser window size.
Come to think of it, Discourse does seem to be able to somehow detect what is not a mobile browser, because on my desktop Firefox browser the Discourse hamburger menu does not even give me the option of using the mobile version.