User Agent String selection for Ubuntu Browser

Registered by Bill Filler on 2013-08-19

finalization of user-agent string for Ubuntu Browser

Blueprint information

Bill Filler
Needs approval
Olivier Tilloy
Series goal:
Milestone target:
milestone icon ubuntu-13.10
Started by
Bill Filler on 2013-08-19

Related branches



Current user-agent string:

    "Mozilla/5.0 (Ubuntu; $formFactor) WebKit/$webkitVersion"

where $formFactor would be one of "Mobile", "Tablet", "Desktop",
and $webkitVersion currently is "537.21".

Some interesting pointers on the topic:

By implementing a user-agent string similar to the ones used by Mozilla in their mobile products, we will directly benefit from the evangelism ground work they do to convince websites to implement a sane user-agent detection mechanism.

The key to wide compatibility at present is an automatic override mechanism, similar to what’s implemented in B2G, that allows changing the user-agent string on the fly when sending a request for certain domain names which we know are not serving us the right content by default.

The current overrides list was initially built using’s top 100 global sites, and comparing their rendering to what chrome on android does.

It appears that this new user-agent string introduced important regressions in sites/apps that used to work OK, those regressions need to be identified and fixed, either by using the override mechanism, or by tweaking the default UA string.

Note that unlike Mozilla, at the moment we don’t have a strict policy of associating an evangelism bug report to each override, and actively lobbying the webmasters to implement a better detection mechanism. This is probably something we want to set up, and we’d want to collaborate with Mozilla’s evangelism team on this one.

There are several ways in which the current implementation could be improved:
 - on-the-fly update of overrides list (in the background)
 - C++ implementation to improve lookup performance, and pre-compute the modified UA strings
 - non-hackish and reliable way of detecting the form factor

There are probably other non-obvious ways in which the implementation could be improved, as well as issues that I have overlooked, so this session should serve as a forum for questions and suggestions.


Work Items

Work items:
[osomon] bug reporting mechanism to report sites not working right, document it (wiki) : TODO
[nskaggs] organize a call for testing to crowd source discovery of "broken" mobile sites (once the bug reporting mechanism is in place) : TODO
[rick-rickspencer3] Set up evangelism process and talk to sites maintainers, discuss with mozilla guys : TODO
[osomon] update facebook user-agent string : DONE
[rick-rickspencer3] get in touch with facebook and ask them to serve us the right content for our default UA string : TODO
[osomon] update UA strings for all default webapps shipped on Ubuntu Touch and notify rick-rickspencer3 to kick off evangelism : TODO
[osomon] investigate how adding a Chrome token to the default UA string might help : TODO
[osomon] detect iphone or apple store url scheme and display appropriate error page : TODO
[chrisccoulson] get the tool for comparing web page output based on different UAs from Mozilla to ensure proper output : TODO
[osomon] investigate updating overrides list in the background : INPROGRESS

This blueprint contains Public information 
Everyone can see this information.