Update: There was a typo with the Firefox OS UA in the original post. The last version number in the UA has been corrected to 14.0.
A decision has been reached on the Firefox OS user agent (UA) string. A key point in the discussion about the UA was whether to include an “Android” token to help with mobile Web compatibility. The UA string for Firefox OS will not include any operating system token. Gerv summarized the rationale in the bug:
In absence of any new information, this decision is made. But here is a rationale summary: any OS identifier involving “Android” will lead to bugs like bug 777633 (serving of Android intents), the pushing of “install this Android app!” and other problems. Such problems will continually occur, and evangelising them is hard. UAs with “Gonk” or “B2G” as their OS identifier had the same content profile as UAs with no OS identifier at all. Leaving out the OS means we don’t have to change UAs when we change OS in the future, meaning we have less evangelism to do later. Having it different from Fennec Android makes market share determination a little easier. And finally, having no OS identifier is a strong values statement of “the web is the platform”.
The Firefox OS UA will be:
Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0
As a reminder, the Firefox for Android UAs are:
Mozilla/5.0 (Android; Mobile; rv:14.0) Gecko/14.0 Firefox/14.0 Mozilla/5.0 (Android; Tablet; rv:14.0) Gecko/14.0 Firefox/14.0
All Firefox UAs are documented in the Gecko user agent string reference.
the token “14” is repeated three times (“14.0” twice). can we get even more minimalistic? can we eliminate at least one, of not two of those?
It used to be until recently that “Gecko” was followed by a date. We froze the date back in 2010 for anti-fingerprinting reasons. Now, we’ve replaced it with a version number, which is shorter and also more accurate. We can’t remove it entirely because there has to be something after the / as per the UA spec.
The rv: token used to be the Gecko version; this now matches the Firefox version. We can’t remove it because people are still using it to check the Gecko version (and we recommended that they did). One day we might be able to remove it, but not for a few years.
Pingback: User Agent String of Firefox OS Will Not Have Operating System Identifier
It is sad that you still need to keep the completely useless “Mozilla/5.0” part, and the dangerous “Firefox” part. “Mobile; Gecko 14” conveys exactly the relevant information and would be soooo nice.
It would probably be possible to remove the Mozilla part. But we are Mozilla 🙂 The Firefox part makes sense for the browser on B2G, which is branded Firefox, and we wanted the browser and the web app runtime to have the same UA. Removing it would also lead to greater compatibility problems immediately, for little gain. There is an element of pragmatism here.