Saturday, September 23, 2023
rated 0 times [  4] [ 0]  / answers: 1 / hits: 2037  / 1 Year ago, wed, august 3, 2022, 1:28:12

I'd like to know which User Agent string (UA) the Ubuntu Web Browser app on mobile devices has, and which implications does that have on existing web sites?

E.g. will most sites behave correctly with it? Is there some kind of fallback UA in case some web sites wouldn't work with it?

More From » ubuntu-touch


The current default UA string is of the following form:

Mozilla/5.0 (Ubuntu; <formFactor>) WebKit/<webkitVersion>

where <formFactor> is one of Mobile, Tablet or Desktop, and <webkitVersion> is the version of WebKit rendering engine (currently 537.21).

So on a phone, the current default UA string is:

Mozilla/5.0 (Ubuntu; Mobile) WebKit/537.21

This default UA string is deliberately short, the rationale is based on Mozilla’s B2G UA string research.

A number of websites and web applications are known not to play well with this default UA (web sites these days do a lot of crazily complicated server-side UA parsing to infer platform capabilities and serve customized content accordingly).

To overcome those issues, the Ubuntu Touch browser embeds an override mechanism that allows overriding the default UA for a given domain name (usually adding an Android token gets us the right content, although it often comes at the price of annoying prompts to install native android applications, which of course doesn’t apply to the platform).
This mechanism is a short-term workaround.
The proper long-term solution is evangelism, whereby users and developers get in touch with website authors to request that their pages and applications recognize our default UA string and serve adequate content.

Note that in a near future we’ll be switching from QtWebKit to Oxide (a thin layer on top of the Chromium Content API) for the rendering engine, meaning the rendering and capabilities will be virtually the same as Chrome’s. To reflect this and to enhance compatibility with existing websites, we will need to update the default UA string (it will be closer to Chrome’s default UA on devices).

[#28506] Friday, August 5, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 500
Total Questions: 104
Total Answers: 92

Location: Virgin Islands (U.S.)
Member since Fri, May 7, 2021
2 Years ago
inaterested questions
Fri, Aug 12, 22, 21:24, 1 Year ago
Wed, Apr 27, 22, 17:14, 1 Year ago
Tue, Oct 26, 21, 20:41, 2 Years ago