Mobile User-Agents

Jan 13, 2012
by Ivan

The last couple of months I've been using my Xoom more and more. I give it many uses, like streaming Starcraft 2 games, reading email, magazines, books, playing MKV videos, gaming and much more. Apps are getting much better over time and so are games.

Sadly, one thing that hasn't changed much is the browser detection. Tons of websites are still rendering an "iPhone" optimized site on my Xoom and even worse, some people think this is Android's fault.

Here is a list of iOS and Android based User Agents:

iOS

Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3

Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3

Android

Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

Mozilla/5.0 (Linux; U; Android 1.5; en-ca; Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1

Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13

Mozilla/5.0 (Linux; U; Android 2.2; en-us; Droid Build/FRG22D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; Nexus S Build/GRI20) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Mozilla/5.0 (Linux; U; Android 4.0.3; en-ca; Xoom Build/ITL41F) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30

How to detect?

For iOS devices is simple, just detect iPhone and display a mobile friendly site and you can show the normal site for the iPad. For Android devices is still pretty simple, just different. Android believes that devices with larger screens should take the "mobile" part off the string.

Regardless of this post, you should be building RWD websites.

Posted in