Ubuntu Touch User-Agent

With the launch of Ubuntu Touch v1.0, the OS now ships its own QtWebKit based browser which will be replaced by Oxide a Chromium-powered webview by 14.04. There has been a lot of discussions arround the user-agent because many large sites(Facebook, Google, Twitter, Yahoo etc..) are sniffing the UA(for iPhone or Android tokens) to serve the mobile version of the site.

Adding an Android or iPhone token will lead to unwanted behaviours, like showing ads for the Android app or even trying to open the Google Play app or the Youtube app. The browser now reports it in the following formats, depending on whether the device is a phone or a tablet, with the addition of an override mechanism that will override the UA on the fly and the site will serve us a proper mobile content.

Facebook Android Ads


Mozilla/5.0 (Ubuntu; Mobile) WebKit/537.21


Mozilla/5.0 (Ubuntu; Tablet) WebKit/537.21


Mozilla/5.0 (Ubuntu; $FormFactor) WebKit/$WebKitRev

You can also get it through JavaScript using the navigator.userAgent

Using the console

So if you are doing UA sniffing it's really better to look for "Mobile" rather than looking the OS identifier.