On 23/01/12 11:43, Gervase Markham wrote:
> effect. I'll also try and save opinions for a follow-up post :-)
And here they are :-)
Summary: the proposed string at
https://wiki.mozilla.org/Fennec/User_Agent is good enough to adopt,
given its other beneficial properties. But the big question is: when are
we going to do the massive evangelism we are going to need for B2G, and
do we use Fennec in that fight or not?
Let us assume for a moment that "the right thing" is getting the same
content as the Android stock browser. I'm not entirely sure that's true,
but it's probably the best simple measure of "the right thing" that we
have. (At any point where iPhone and Android differ, it's probably
because people are doing iPhone or Android-specific content or styling,
and we want the Android version.) If we assume this, then a higher MEAN
score vs. Android stock is "better".
The original proposal for what we should do with the Fennec UA is here:
https://wiki.mozilla.org/Fennec/User_Agent
The justifications for the proposal are laid out on that page; briefly,
we are trying to balance accuracy, brevity, privacy,
non-foot-shootingness and compatibility.
The "Mobile" string from that proposal was tested by John, along with
three variants of it:
Base: Mozilla/5.0 (Mobile; rv:12.0) Gecko/0 Firefox/12.0
+Date: Mozilla/5.0 (Mobile; rv:12.0) Gecko/20100101 Firefox/12.0
+Android: Mozilla/5.0 (Android; Mobile; rv:12.0) Gecko/0 Firefox/12.0
Rearrange: Firefox/12.0 (Mobile; rv:12.0) Gecko/0
Looking at the results vs Android stock, then, the best of my proposed
strings is the "+Android" string:
Mozilla/5.0 (Android; Mobile; rv:12.0) Gecko/0 Firefox/12.0
This string had a MEAN score of 0.9401, which is 6th best when ordered
by the weighed measure, and only 0.0120 points from the string which is
at the top of the weighted measure. In other words, it did pretty well. :-)
Using the analysis in my previous post as to the effect of various
individual changes, we can see whether it's possible to make this string
more compatible.
The only possible change that could be made which would have any
significance would be to add "like AppleWebKit" - that would account for
over half of the (small) gap between this and the top-rated string -
around 0.007 points. However, I would suggest that this lie is not
helpful enough to us to deal with the significant confusion it would
cause, particularly for people who are already trying to get this right
and distinguish between WebKit and Gecko. Breaking the code of those
already well disposed towards us would not be an awesome way to start an
evangelism programme. It is pleasing to see how little difference this
makes; it removes the pressure on us to add such a string.
The proposed string above has the advantage of being in line with the
latest thinking on minimal UA strings, to reduce fingerprinting surface
<
https://wiki.mozilla.org/Fingerprinting#User_Agent>. Fortunately, it
seems, John's data shows us that those removals (language, crypto level,
etc.) have little or no effect on compatibility. It also removes the
Gecko date, as we promised we would do when we froze it for release
builds some time ago. These changes make this string significantly
shorter than other proposals, which is a small speed and bandwidth
advantage, when added up over trillions of requests.
There are two further changes we need to consider, one fairly
inconsequential, one massive:
Rearrangement
-------------
The evidence suggests that removing the Mozilla/5.0 string does not
actually have much effect. So, we could switch it to:
Firefox/12.0 (Android; Mobile; rv:12.0) Gecko/0
without seeing a significant decrease in compatibility - if we wanted
to. (The tested string in which this change was made did badly in
absolute terms, but only a tiny bit worse than a similar string without
the change. Its poor showing overall was because it didn't have the word
"Android" in it.)
The advantage would be 12 bytes less on every HTTP request Firefox
sends, and the removal of a redundancy. The disadvantage is nostalgia :-)
"Android"
---------
This is a big deal.
Having "Android" in the string makes a massive difference - 0.1400
points, 1/7th of the sites tested. B2G is not Android. So, if the B2G
user agent is not going to lie and include the string "Android", then we
have a big evangelism task ahead of us. The question is: do we take it
on now, by not putting "Android" in the Fennec UA, and pave the way for
B2G (which would then have exactly the same UA), or do we put "Android"
in the Fennec UA, and put off this big evangelism job for a few months?
The Fennec and B2G teams, and Mozilla's product management, need to make
a decision and when we are going to take this burden on - now, or later?
Gerv