Account confirmers, Anti-spam team, Confirmed users, Bureaucrats and Sysops emeriti
4,925
edits
m (→Gecko Date) |
No edit summary |
||
| Line 1: | Line 1: | ||
This is a proposal for what the Firefox Mobile User Agent string should be. | This is a proposal for what the Firefox Mobile User Agent string should be, which has been endorsed by the Fennec team. It takes into account various newsgroup discussions, plus John Jensen's [https://docs.google.com/spreadsheet/ccc?key=0AushOZLFQoR0dGQ0Ry1HYmZGUEg5dXJDYUstS2dwcWc&hl=en_GB#gid=0 comparative analysis] of various potential User Agent strings. (See below for more info on how to correctly interpret that data.) | ||
==Summary== | ==Summary== | ||
| Line 5: | Line 5: | ||
Mobile: | Mobile: | ||
Mozilla/5.0 (Mobile; rv:12.0) Gecko/0 Firefox/12.0 | Mozilla/5.0 (Android; Mobile; rv:12.0) Gecko/12.0 Firefox/12.0 | ||
Tablet (touch screen device): | Tablet (touch screen device): | ||
Mozilla/5.0 (Tablet; rv:12.0) Gecko/0 Firefox/12.0 | Mozilla/5.0 (Android; Tablet; rv:12.0) Gecko/12.0 Firefox/12.0 | ||
Netbook (or tablet with attached pointing device, e.g. in a dock): | Netbook (or tablet with attached pointing device, e.g. in a dock): | ||
Mozilla/5.0 ( | Mozilla/5.0 (Android; Desktop; rv:12.0) Gecko/12.0 Firefox/12.0 | ||
(Examples are for Firefox 12; clearly, 12.0 would change for later versions.) | (Examples are for Firefox 12; clearly, 12.0 would change for later versions.) | ||
| Line 23: | Line 23: | ||
Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10 | Mozilla/5.0 (iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10 | ||
In addition, variance in the user agent string adds additional bits of entropy which can be used for [http://panopticlick.eff.org/ browser fingerprinting]. For this reason, we have done [https://wiki.mozilla.org/Fingerprinting work in Firefox 4 and beyond] to try and reduce UA string variance. | In addition, variance in the user agent string adds additional bits of entropy which can be used for [http://panopticlick.eff.org/ browser fingerprinting]. For this reason, we have done [https://wiki.mozilla.org/Fingerprinting work in Firefox 4 and beyond] to try and reduce UA string variance. The only variable bits are the version number, plus Mobile/Tablet/Desktop, plus the OS. | ||
So our hope is to provide the shortest UA string possible, encourage good practice in sniffing, avoid giving developers footguns, and (as much as possible) avoid breaking existing working sites. It is not a goal to make sites which are currently broken to work - we don't think playing that game this way leads to a good outcome, and are committed to solving that problem through [[Mobile/Evangelism|evangelism]] and compatibility improvements to our platform. But <b>we want to and must nail down what the string should be, so we can start the work of evangelism without the risk of telling sites things which later turn out to become false.</b> | So our hope is to provide the shortest UA string possible, encourage good practice in sniffing, avoid giving developers footguns, and (as much as possible) avoid breaking existing working sites. It is not a goal to make sites which are currently broken to work - we don't think playing that game this way leads to a good outcome, and are committed to solving that problem through [[Mobile/Evangelism|evangelism]] and compatibility improvements to our platform. But <b>we want to and must nail down what the string should be, so we can start the work of evangelism without the risk of telling sites things which later turn out to become false.</b> | ||
| Line 35: | Line 35: | ||
===Platform=== | ===Platform=== | ||
We have put the "Mobile" and "Tablet" identifiers | We have put the "Mobile" and "Tablet" identifiers among the platform identifiers because that's the logical place for them to go. Anyone sniffing for the string "Mobile" doesn't care where they are. Firefox is not going to match anyone sniffing for "Mobile Safari" wherever we put the word "Mobile" (and sometimes that string isn't present on WebKit anyway, as some Webkit UAs have "Mobile/<ver> Safari"). Mobile Internet Explorer [http://blogs.msdn.com/b/iemobile/archive/2010/03/25/ladies-and-gentlemen-please-welcome-the-ie-mobile-user-agent-string.aspx uses "IEMobile"]. So really, just sniffing for "Mobile" is the way to find all these mobile browsers. (Although iPad also says "Mobile".) | ||
On the tablet side, Opera already calls itself "Opera Tablet" when running on a tablet, so there is also precedent for using that string to identify tablets, and for varying a tablet UA compared to desktop. The iPad identifies itself as an "iPad" instead of a "Macintosh" (clearly, Apple isn't going to use the generic device name). | On the tablet side, Opera already calls itself "Opera Tablet" when running on a tablet, so there is also precedent for using that string to identify tablets, and for varying a tablet UA compared to desktop. The iPad identifies itself as an "iPad" instead of a "Macintosh" (clearly, Apple isn't going to use the generic device name). | ||
If the device is not actually a touch tablet, e.g. a netbook, we want a "desktop-like" UA. | If the device is not actually a touch tablet, e.g. a netbook, we want a "desktop-like" UA. We hope that we can use "Desktop" for this; we may get it added to the Firefox Desktop UA as well. | ||
===Gecko Date=== | ===Gecko Date=== | ||
We have taken the opportunity to remove the Gecko date entirely (i.e. reduce to "Gecko/0" - as having <u>something</u> after the / is required by the HTTP spec). We have [http://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/ warned people we are going to do this], and starting on mobile means less up-front extra breakage (given that we are making other changes at the same time). Doing this in two batches might mean we'd have to re-evangelise sites. Changing this on desktop can happen on an independent schedule (after, or even before). | We have taken the opportunity to remove the Gecko date entirely (i.e. reduce to "Gecko/12.0" - as having <u>something</u> after the / is required by the HTTP spec). We have [http://hacks.mozilla.org/2010/09/final-user-agent-string-for-firefox-4/ warned people we are going to do this], and starting on mobile means less up-front extra breakage (given that we are making other changes at the same time). Doing this in two batches might mean we'd have to re-evangelise sites. Changing this on desktop can happen on an independent schedule (after, or even before). | ||
We need a "/" because some people detect "Gecko/" to distinguish from "like Gecko". And so we need something after the /. 12.0 had the most support; it means the version number is in 3 times, but we'll have to live with that. | |||
==Q&A== | ==Q&A== | ||
| Line 51: | Line 51: | ||
===What happens next?=== | ===What happens next?=== | ||
This is a proposal | This is a proposal which has been endorsed by the Fennec module owners as what they want to do for Fennec 11, the first release of Native Fennec. | ||
===Do you think this will fix everything?=== | ===Do you think this will fix everything?=== | ||
| Line 73: | Line 73: | ||
There is a large array of hardware out there on which the platforms which support Firefox Mobile run, and doubtless there will be more in the future. [https://bugzilla.mozilla.org/show_bug.cgi?id=625238 A bug] to add specific device information to the User Agent was WONTFIXED. The goal is for Firefox to work the same across all of these. In addition, adding hardware/OS information can have unexpected side effects; e.g. adding "Nokia" for the N900 led to us being served content appropriate for feature phones (non-smartphones). | There is a large array of hardware out there on which the platforms which support Firefox Mobile run, and doubtless there will be more in the future. [https://bugzilla.mozilla.org/show_bug.cgi?id=625238 A bug] to add specific device information to the User Agent was WONTFIXED. The goal is for Firefox to work the same across all of these. In addition, adding hardware/OS information can have unexpected side effects; e.g. adding "Nokia" for the N900 led to us being served content appropriate for feature phones (non-smartphones). | ||
=== | ===Why "Android"?=== | ||
Because | Because our analysis shows it makes an enormous difference in terms of getting a decent mobile site. | ||
B2G isn't Android and may well not say "Android"; we will have to work hard to get sites to not sniff for Android going forward. But right now, the Fennec team judged that we need it in there. | |||
==Open Questions== | ==Open Questions== | ||
===Mozilla/5.0=== | ===Mozilla/5.0=== | ||
| Line 96: | Line 86: | ||
Given that we are Mozilla, there's a strong emotional attachment there. But that may not be enough to outweigh the fewer-bytes-sent argument, if the compatibility impact is weak. | Given that we are Mozilla, there's a strong emotional attachment there. But that may not be enough to outweigh the fewer-bytes-sent argument, if the compatibility impact is weak. | ||