Closed Bug 1199592 Opened 4 years ago Closed 4 years ago

[TV 2.5][Browser] Decide the proper UA string for TV

Categories

(Firefox OS Graveyard :: Gaia::TV, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S9 (16Oct)

People

(Reporter: cynthiatang, Assigned: schien)

References

Details

(Keywords: dev-doc-complete, Whiteboard: [ft:conndevices])

Attachments

(3 files, 2 obsolete files)

Browser always redirects your website to its mobile version

1. Launch Browser App
2. Go to www.youtube.com 

Actual: 
 - Browser always redirects your website to its mobile version ( http://m.youtube.com/? )

Expected:
 - Browser should not redirects your website to its mobile version
Summary: [Browser] Browser always redirects your website to its mobile version → [TV 2.5][Browser] Browser always redirects your website to its mobile version
Whiteboard: [ft:conndevices]
Comment on attachment 8667743 [details] [review]
[gaia] schien:bug1199592-turn-off-ua-override-on-tv > mozilla-b2g:master

The behavior of TV browser app should be similar to desktop browser, thus we don't need to override UA string like mobile devices.
Attachment #8667743 - Flags: review?(rexboy)
Attachment #8667743 - Flags: review?(fabrice)
Assignee: nobody → schien
Are you sure this fix works? The ua override we get for b2g is at https://dynamicua.cdn.mozilla.net/0/{3c2e2abc-06d4-11e1-ac3b-374f68613e61} and currently doesn't contain any override for youtube.
Comment on attachment 8667743 [details] [review]
[gaia] schien:bug1199592-turn-off-ua-override-on-tv > mozilla-b2g:master

Tested but seems it's not working for me on B2G-desktop. Does the version matters? It's a build at about 3 weeks ago.
Attachment #8667743 - Flags: review?(rexboy)
Comment on attachment 8667743 [details] [review]
[gaia] schien:bug1199592-turn-off-ua-override-on-tv > mozilla-b2g:master

Hmm weird, this patch happened to work on my local environment before I submitted pull request but now it doesn't work.
Attachment #8667743 - Attachment is obsolete: true
Attachment #8667743 - Flags: review?(fabrice)
I tried following UA string on Youtube and it'll serve desktop page.
Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0

I plan to modify nsHttpHandler and nsSystemInfo to support TV category.
In nsHttpHandler we should get "tv" property from system-info service and assign "TV" to |mCompatDevice|. [1]
In nsSystemInfo we need to check if |ro.build.characteristics| is "tv" and add a "tv" property accordingly. [2]

But I haven't decided how to figure out the "tv" type in simulator, maybe use a custom pref in Gaia?

[1] https://dxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpHandler.cpp#757
[2] https://dxr.mozilla.org/mozilla-central/source/xpcom/base/nsSystemInfo.cpp#743
The UA string on TV will looks like:
Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0

1. for real device we'll read the device type from 'ro.build.characteristics'
2. for simulator we'll read the device type from preference which can be customized by Gaia profile.

I don't know how Mulet works so I didn't have code for that, maybe @fabrice can double check if my patch will break it. I also don't plan to scenario like Gaia TV profile on phone device.
Attachment #8670073 - Flags: review?(fabrice)
Attachment #8670073 - Flags: feedback?(gerv)
I'm not a good enough expert on UA strings to make a concrete proposal for what we should do here. But we should absolutely let the UA string indicate that this is a TV-device, the same way that we in Fennec use a UA-string which indicate that it's a "mobile" device.

I don't know if there already are industry conventions for how to signal that a device is a TV through the UA-string. If there are, we should consider following them.
Comment on attachment 8670075 [details] [review]
[gaia] schien:bug1199592-turn-off-ua-override-on-tv > mozilla-b2g:master

Provide customized UA string for TV and Tablet Gaia profile on simulator.
Attachment #8670075 - Flags: review?(rexboy)
Attachment #8670075 - Flags: review?(fabrice)
vimeo.com need additional "Android" in UA string for showing desktop version, therefore I add another entry in ua-update.json.in. The same ua-update.json file can be used for supporting mobile, tablet, and tv because they have exclusive pattern for UA string replacement.

The UA string after replacement looks like:
"Mozilla/5.0 (Android; TV; rv:44.0) Gecko/20100101 Firefox/44.0"
Attachment #8670084 - Flags: feedback?(jonas)
Attachment #8670084 - Flags: feedback?(fabrice)
Attachment #8670073 - Flags: review?(fabrice) → review+
Attachment #8670075 - Flags: review?(fabrice) → review+
Comment on attachment 8670084 [details] [diff] [review]
customize-ua-string-for-vimeo-com.patch

Review of attachment 8670084 [details] [diff] [review]:
-----------------------------------------------------------------

SC, I'm redirecting to the web compat team because I'm not sure how we manage updates to up-updated.json.in
Attachment #8670084 - Flags: feedback?(miket)
Attachment #8670084 - Flags: feedback?(kdubost)
Attachment #8670084 - Flags: feedback?(fabrice)
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #11)
> vimeo.com need additional "Android" in UA string for showing desktop
> version, therefore I add another entry in ua-update.json.in. 

If you want the desktop version (which I think we generally do on TVs), why not just send the desktop UA to Vimeo - i.e. remove both "TV" and "Android"?

In general, I think the right thing to do for TVs is to send a desktop-like UA, because we generally want desktop content on a TV. I'm not sure it's a good idea to continue to multiple form factor indicators in the UA, because they are actually the wrong way of deciding things. You should send a touch UI if the device supports touch, not if it claims to be a mobile phone. That sort of thing.

What UA have we been using for the TV project so far? What compat problems have we seen? :miketaylr?

Gerv
Comment on attachment 8670075 [details] [review]
[gaia] schien:bug1199592-turn-off-ua-override-on-tv > mozilla-b2g:master

change reviewer to @evelyn since @rexboy is on PTO.
Attachment #8670075 - Flags: review?(rexboy) → review?(ehung)
(In reply to Gervase Markham [:gerv] from comment #13)
> (In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment
> #11)
> > vimeo.com need additional "Android" in UA string for showing desktop
> > version, therefore I add another entry in ua-update.json.in. 
> 
> If you want the desktop version (which I think we generally do on TVs), why
> not just send the desktop UA to Vimeo - i.e. remove both "TV" and "Android"?
I did some experiment with UA string removing both "TV" and "Android" and the behavior varies on each website.
 - Youtube/Google/Bing/BBC will return desktop website.
 - Vimeo will return mobile website.

Looks like Vimeo is white-listing desktop browser from my experiment.
> 
> In general, I think the right thing to do for TVs is to send a desktop-like
> UA, because we generally want desktop content on a TV. I'm not sure it's a
> good idea to continue to multiple form factor indicators in the UA, because
> they are actually the wrong way of deciding things. You should send a touch
> UI if the device supports touch, not if it claims to be a mobile phone. That
> sort of thing.
This kind of detection will fail on TV. TV generally supports mouse but mouse might not connected to TV at the moment while browsing. Website might want to deliver remote-control-favor UI, but I guess website can deliver UI supports both mouse and keyboard at the same time.
The other thing might be different on TV is media format and resolution, but TBH I don't know how website today dealing with this.
> 
> What UA have we been using for the TV project so far? What compat problems
> have we seen? :miketaylr?
The 2015 model of Firefox OS TV uses something like:
  "Mozilla/5.0 (FreeBSD; Viera; rv:44.0) Gecko/20100101 Firefox/44.0"
Vimeo shows mobile website on this TV.
> 
> Gerv

Having a "TV" token in UA string will make site specific UA string a lot easier to implement, but I know this is not a valid argument for adding it.
Attachment #8670075 - Flags: review?(ehung) → review+
Blocks: 1201451
(In reply to [:fabrice] Fabrice Desré from comment #12)
> SC, I'm redirecting to the web compat team because I'm not sure how we
> manage updates to up-updated.json.in

Here's the policy for adding UA overrides to the ua-updates.json.in file:

<https://wiki.mozilla.org/Evangelism/UA_Override_List_Policy>

Once something is merged, there's a cron that runs (hourly? daily? I forget) which pushes the update to our dynamic UA CDN.

:schien, I don't think we've opened a Tech Evangelism bug for this issue on vimeo, have we? Ideally we're talking with the sites so they can fix their detection and we can remove the override.
Flags: needinfo?(schien)
Comment on attachment 8670084 [details] [diff] [review]
customize-ua-string-for-vimeo-com.patch

Review of attachment 8670084 [details] [diff] [review]:
-----------------------------------------------------------------

It seems odd to me that we're adding "Android" to get a Desktop experience, and likely to break in the future if they tweak their Android/mobile detection. Can we not just send a Firefox desktop UA?
Attachment #8670084 - Flags: feedback?(miket) → feedback-
(In reply to Jonas Sicking (:sicking) from comment #8)
> I'm not a good enough expert on UA strings to make a concrete proposal for
> what we should do here. But we should absolutely let the UA string indicate
> that this is a TV-device, the same way that we in Fennec use a UA-string
> which indicate that it's a "mobile" device.
> 
> I don't know if there already are industry conventions for how to signal
> that a device is a TV through the UA-string. If there are, we should
> consider following them.

Looking at <https://udger.com/resources/ua-list/device-detail?device=Smart+TV>, nearly all Smart TVs (except Panasonic) send some form of "TV" in the UA string.

GoogleTV, Opera TV, AppleTV, HbbTV, SmartTV, etc. Given that we're the newest to the TV game we should probably consider something like "Firefox TV". Or possibly just "TV". I can imagine lots of sniffing code doing navigator.userAgent.indexOf("TV"). But this kind of thing needs some research. Has anyone done that?

If we do not want mobile optimized content, sending the default B2G UA string is *not* what we want (even though it gets more desktop content than Fennec).

(In reply to Gervase Markham [:gerv] from comment #13)
> In general, I think the right thing to do for TVs is to send a desktop-like
> UA, because we generally want desktop content on a TV. I'm not sure it's a
> good idea to continue to multiple form factor indicators in the UA, because
> they are actually the wrong way of deciding things. You should send a touch
> UI if the device supports touch, not if it claims to be a mobile phone. That
> sort of thing.

I'm not really an expert in TV UX. But my (ex-Opera) colleague Patrick Lauke is, whether he likes it or not. Patrick, do you know what industry recommended practices are for in terms of sending "TV optimized" content? Does it lean towards Desktop, Tablet-like, or Mobile?
 
> What UA have we been using for the TV project so far? What compat problems
> have we seen? :miketaylr?

This is the first TV compat issue that has landed on webcompat's radar. But if we haven't published our UA string (or even decided on it) or don't follow industry conventions (as unappealing as they might be), I imagine it's the first of many.
Flags: needinfo?(redux)
> Patrick, do you know what industry recommended practices are for in terms of
> sending "TV optimized" content? Does it lean towards Desktop, Tablet-like, or Mobile?

I've been out of the industry loop for a while, but in general, the assumption seems to be:

- sites will of course create a super-customised version just for TVs (broken down by each specific TV that they can sniff/recognise), so some form of "TV" info needs to be present in the UA string - clearly, that's wishful thinking from the navel-gazing TV industry, as most sites don't actually do this...however, certain TV specific sites on the other hand may do the reverse and kick out any UA *without* a "TV" bit
- sites will send desktop version

Too many sites (don't have actual numbers, but anecdotally) still make erroneous assumptions a la "if it has a mobile-looking UA string, it must support touch events", so for the time being, I think sadly that appearing to be a desktop browser is the safest bet.

In short, either make up a UA string that looks almost exactly like a desktop, but has the "TV" keyword in it...or just pretend to be a desktop browser. In all cases, do not pretend to be a mobile/tablet device (unless the user is given the option to explicitly switch, a la "request the mobile site"...but then you'd also need to follow through with sensible viewport width / ideal viewport, as per http://patrickhlauke.github.io/web-tv/ideal-viewport/)
Flags: needinfo?(redux)
(In reply to Mike Taylor [:miketaylr] from comment #16)
> (In reply to [:fabrice] Fabrice Desré from comment #12)
> > SC, I'm redirecting to the web compat team because I'm not sure how we
> > manage updates to up-updated.json.in
> 
> Here's the policy for adding UA overrides to the ua-updates.json.in file:
> 
> <https://wiki.mozilla.org/Evangelism/UA_Override_List_Policy>
> 
> Once something is merged, there's a cron that runs (hourly? daily? I forget)
> which pushes the update to our dynamic UA CDN.
> 
> :schien, I don't think we've opened a Tech Evangelism bug for this issue on
> vimeo, have we? Ideally we're talking with the sites so they can fix their
> detection and we can remove the override.

Yes, I totally agree that we should open an evangelism bug first and that's why I separate the patch for feedback only. I've open bug 1212181 for tracking this.

I put this patch here simply for demonstrating that we can serve only single ua-update.json for both mobile and TV product.
Flags: needinfo?(schien)
(In reply to Mike Taylor [:miketaylr] from comment #17)
> Comment on attachment 8670084 [details] [diff] [review]
> customize-ua-string-for-vimeo-com.patch
> 
> Review of attachment 8670084 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> It seems odd to me that we're adding "Android" to get a Desktop experience,
> and likely to break in the future if they tweak their Android/mobile
> detection. Can we not just send a Firefox desktop UA?

Firefox desktop UA has one part for the underlying OS so I don't know how to mimic that part for Firefox OS. Are you suggesting that we inject "Linux" in UA string?

I'm copying vimeo specific comments to bug 1212181 and let move the following discussion there.
(In reply to Mike Taylor [:miketaylr] from comment #18)
> (In reply to Gervase Markham [:gerv] from comment #13)
>  
> > What UA have we been using for the TV project so far? What compat problems
> > have we seen? :miketaylr?
> 
> This is the first TV compat issue that has landed on webcompat's radar. But
> if we haven't published our UA string (or even decided on it) or don't
> follow industry conventions (as unappealing as they might be), I imagine
> it's the first of many.

Yes this is the first webcompat bug for TV because we let partner use their legacy UA string for 2015 model. However, we cannot use the same one on our TV simulator.
From comment #18 and #19, does it means the following UA string I created for TV is ok?

Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0

I plan to check-in those r+'d patches once we've reached the consensus.
Comment on attachment 8670084 [details] [diff] [review]
customize-ua-string-for-vimeo-com.patch

Move the vimeo.com compat discussion to bug 1212181.
Attachment #8670084 - Attachment is obsolete: true
Attachment #8670084 - Flags: feedback?(kdubost)
Attachment #8670084 - Flags: feedback?(jonas)
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #23)
> From comment #18 and #19, does it means the following UA string I created
> for TV is ok?
> 
> Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0

From my perspective, yes. "Gecko/20100101" signals more of a Desktop-like UA than what we do on mobile (Gecko/44.0, etc.). And "TV" is the simplest subset of any "BigCorpTV" string. 

I would say let's be really sure though. Having to change this at any point in the future is going to cause us pain.
any chance to run an automated run of whatever top-100 TV-specific/TV-optimized sites are out there with different UA strings, to try and find the minimum string that triggers the right sniffing/redirection?
(In reply to Patrick H. Lauke from comment #26)
> any chance to run an automated run of whatever top-100
> TV-specific/TV-optimized sites are out there with different UA strings, to
> try and find the minimum string that triggers the right sniffing/redirection?

John Jensen has helped us with spidering and running diff stats in the past before. Here's some strawmen candidates for testing. No idea if such a top-100 TV-optimized sites exists though, Alexa Top-N might be good enough. Some of these suggestions are from this bug, and some from Bug 1015872 (which I guess this bug has turned into...).

1) Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
2) Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
3) Mozilla/5.0 (rv:44.0) Gecko/44.0 Firefox/44.0 
4) Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0

Compared against: 

(2015 Samsung SmartTV model)
5) Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1 
(random GoogleTV UA string)
6) Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24 

I didn't include Android TV or Apple TV because they don't ship web browsers.

John, could you do another spider/diff run when you get a chance?
Flags: needinfo?(jjensen)
See Also: → 1015872
> John, could you do another spider/diff run when you get a chance?

Hi Mike, certainly. I'll run against those 6 UAs shortly.
Flags: needinfo?(jjensen)
Can you hold off 24 hours? Last time we did this, we did the wrong set of UAs at least once, and the work had to be redone. I'm in Istanbul and it's 10.20pm. I promise to review the list tomorrow :-)

Gerv
No problem!
OK. This is what I think we should do:

1) Full Linux Desktop UA
   Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
2) Shorter Linux desktop UA (like Fennec Netbook)
   Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
3) No-OS desktop UA
   Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0 
4) Gecko date TV UA
   Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
5) Gecko version-number TV UA
   Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
6) Gecko date TV UA with OS:
   Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
7) Gecko version-number TV UA with OS (like Fennec mobile/tablet)
   Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
8) 2015 Samsung SmartTV model
   Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1 
9) Random GoogleTV UA string
   Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Does that seem like a good range to everyone? It should allow us to compare various possible TV UA variants with standard desktop and other TV OS UAs, to see if adding "TV" makes a difference, to see if adding an OS makes a difference, and to see if Gecko date vs. version makes a difference.

Gerv
Hi all. OK, this will take a little while to run -- 900,000 page downloads, and then ~32m comparisons. It's no problem, but it won't be done today. Will start it shortly.
Here are the results for the top 100 and 1000 websites. I'll add the results for the top 10,000 and 100,000 websites on ~Monday, as the processing is still running. 

Each UA is given a number at the top.
Columns:
- Pair: which two UAs were compared, using Python's difflib.quick_ratio function.
  - 0.0 == the HTML served to the two UAs was completely different
  - 1.0 == the HTML served to the two UAs was identical
- N: Total number of sites compared (usually not 100 or 1000 due site outages/download timeouts)
- Min: Minimum difflib score for the two UAs
- Max: Maximum difflib score for the two UAs
- Median: Median difflib score for the two UAs
- Mean: Mean difflib score for the two UAs
- StDev: Standard deviation of the scores for the two UAs
- CoV: Coefficient of Variance of the scores for the two UAs

FAQ:
Q: Does the crawler follow HTTP header redirects?
A: Yes.

Q: Does it look for and follow meta http-equiv redirects?
A: Yes.

Q: Does it parse Javascript, CSS, build a DOM or CSSOM?
A: No.

Q: What headers, besides User-Agent, does the crawler send?
A: Just "Accept-Encoding: ''"

This is in Markdown format:

TOP 100
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|92|0.939|1.000|0.999|0.995|0.010|0.010
(0, 2)|92|0.167|1.000|0.999|0.972|0.110|0.114
(0, 3)|92|0.172|1.000|0.999|0.980|0.100|0.102
(0, 4)|92|0.172|1.000|0.999|0.980|0.100|0.102
(0, 5)|92|0.172|1.000|0.999|0.986|0.086|0.087
(0, 6)|93|0.172|1.000|0.999|0.986|0.085|0.087
(0, 7)|91|0.000|1.000|0.988|0.768|0.301|0.393
(0, 8)|93|0.000|1.000|0.996|0.936|0.191|0.205
(1, 2)|92|0.167|1.000|0.999|0.973|0.111|0.114
(1, 3)|92|0.172|1.000|0.999|0.980|0.100|0.102
(1, 4)|91|0.172|1.000|0.999|0.981|0.100|0.102
(1, 5)|91|0.172|1.000|0.999|0.986|0.086|0.088
(1, 6)|92|0.172|1.000|0.999|0.987|0.086|0.087
(1, 7)|90|0.000|1.000|0.988|0.765|0.302|0.395
(1, 8)|92|0.000|1.000|0.996|0.935|0.192|0.206
(2, 3)|92|0.167|1.000|0.999|0.968|0.129|0.133
(2, 4)|91|0.167|1.000|0.999|0.968|0.131|0.135
(2, 5)|91|0.166|1.000|0.999|0.963|0.139|0.144
(2, 6)|92|0.167|1.000|0.999|0.963|0.138|0.143
(2, 7)|90|0.000|1.000|0.920|0.741|0.304|0.411
(2, 8)|92|0.000|1.000|0.992|0.912|0.215|0.236
(3, 4)|91|0.950|1.000|0.999|0.995|0.010|0.011
(3, 5)|91|0.498|1.000|0.999|0.990|0.053|0.053
(3, 6)|92|0.498|1.000|0.999|0.989|0.053|0.053
(3, 7)|90|0.000|1.000|0.987|0.767|0.297|0.387
(3, 8)|92|0.000|1.000|0.996|0.939|0.181|0.193
(4, 5)|91|0.498|1.000|0.999|0.989|0.053|0.053
(4, 6)|92|0.498|1.000|0.999|0.990|0.052|0.053
(4, 7)|90|0.000|1.000|0.988|0.769|0.297|0.386
(4, 8)|92|0.000|1.000|0.996|0.939|0.181|0.193
(5, 6)|92|0.929|1.000|0.999|0.995|0.011|0.011
(5, 7)|90|0.000|1.000|0.987|0.774|0.296|0.383
(5, 8)|92|0.000|1.000|0.997|0.944|0.175|0.185
(6, 7)|91|0.000|1.000|0.988|0.776|0.295|0.381
(6, 8)|93|0.000|1.000|0.997|0.945|0.175|0.185
(7, 8)|91|0.086|1.000|0.990|0.803|0.271|0.337

TOP 1000
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|919|0.170|1.000|1.000|0.996|0.034|0.034
(0, 2)|917|0.167|1.000|1.000|0.989|0.066|0.067
(0, 3)|919|0.010|1.000|1.000|0.993|0.053|0.053
(0, 4)|918|0.010|1.000|1.000|0.993|0.054|0.054
(0, 5)|919|0.172|1.000|1.000|0.996|0.034|0.034
(0, 6)|919|0.172|1.000|1.000|0.996|0.033|0.033
(0, 7)|910|0.000|1.000|1.000|0.907|0.211|0.233
(0, 8)|917|0.000|1.000|1.000|0.984|0.095|0.097
(1, 2)|916|0.167|1.000|1.000|0.988|0.070|0.071
(1, 3)|920|0.008|1.000|1.000|0.993|0.058|0.058
(1, 4)|916|0.008|1.000|1.000|0.993|0.058|0.059
(1, 5)|918|0.170|1.000|1.000|0.996|0.039|0.039
(1, 6)|920|0.169|1.000|1.000|0.996|0.040|0.040
(1, 7)|909|0.000|1.000|1.000|0.905|0.213|0.235
(1, 8)|916|0.000|1.000|1.000|0.984|0.093|0.095
(2, 3)|916|0.034|1.000|1.000|0.990|0.070|0.070
(2, 4)|914|0.034|1.000|1.000|0.989|0.070|0.071
(2, 5)|915|0.166|1.000|1.000|0.988|0.070|0.071
(2, 6)|915|0.167|1.000|1.000|0.989|0.069|0.070
(2, 7)|906|0.000|1.000|1.000|0.899|0.218|0.242
(2, 8)|914|0.000|1.000|1.000|0.975|0.115|0.118
(3, 4)|916|0.672|1.000|1.000|0.997|0.015|0.015
(3, 5)|918|0.008|1.000|1.000|0.995|0.043|0.043
(3, 6)|919|0.008|1.000|1.000|0.995|0.042|0.042
(3, 7)|909|0.000|1.000|1.000|0.905|0.213|0.235
(3, 8)|916|0.000|1.000|1.000|0.982|0.101|0.103
(4, 5)|916|0.008|1.000|1.000|0.995|0.044|0.044
(4, 6)|916|0.008|1.000|1.000|0.995|0.043|0.043
(4, 7)|907|0.000|1.000|1.000|0.905|0.213|0.235
(4, 8)|914|0.000|1.000|1.000|0.982|0.101|0.103
(5, 6)|918|0.720|1.000|1.000|0.998|0.011|0.011
(5, 7)|909|0.000|1.000|1.000|0.907|0.211|0.232
(5, 8)|916|0.000|1.000|1.000|0.984|0.093|0.095
(6, 7)|909|0.000|1.000|1.000|0.907|0.210|0.232
(6, 8)|916|0.000|1.000|1.000|0.984|0.093|0.094
(7, 8)|914|0.005|1.000|1.000|0.911|0.207|0.227
Here are the final results for the top 10, 100, 1000, 10000 and 100000 websites:

TOP 10
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|10|0.969|1.000|0.998|0.993|0.009|0.010
(0, 2)|10|0.969|1.000|0.998|0.994|0.009|0.010
(0, 3)|10|0.955|1.000|0.998|0.990|0.016|0.016
(0, 4)|10|0.981|1.000|0.998|0.995|0.006|0.006
(0, 5)|10|0.969|1.000|0.998|0.994|0.009|0.009
(0, 6)|10|0.975|1.000|0.998|0.995|0.007|0.007
(0, 7)|10|0.000|1.000|0.832|0.671|0.373|0.556
(0, 8)|10|0.000|1.000|0.990|0.846|0.316|0.373
(1, 2)|10|0.988|1.000|0.999|0.996|0.005|0.005
(1, 3)|10|0.948|1.000|0.998|0.991|0.015|0.016
(1, 4)|10|0.975|1.000|0.999|0.995|0.007|0.007
(1, 5)|10|0.975|1.000|0.999|0.994|0.008|0.008
(1, 6)|10|0.969|1.000|0.999|0.993|0.010|0.010
(1, 7)|10|0.000|1.000|0.833|0.671|0.373|0.555
(1, 8)|10|0.000|1.000|0.991|0.846|0.316|0.373
(2, 3)|10|0.948|1.000|0.998|0.991|0.016|0.016
(2, 4)|10|0.975|1.000|0.999|0.995|0.008|0.008
(2, 5)|10|0.987|1.000|0.999|0.996|0.005|0.005
(2, 6)|10|0.969|1.000|0.999|0.993|0.010|0.010
(2, 7)|10|0.000|1.000|0.834|0.672|0.373|0.555
(2, 8)|10|0.000|1.000|0.990|0.846|0.316|0.373
(3, 4)|10|0.950|1.000|0.999|0.991|0.015|0.015
(3, 5)|10|0.950|1.000|0.998|0.991|0.015|0.015
(3, 6)|10|0.959|1.000|0.999|0.992|0.013|0.013
(3, 7)|10|0.000|1.000|0.813|0.667|0.373|0.559
(3, 8)|10|0.000|1.000|0.990|0.843|0.315|0.373
(4, 5)|10|0.975|1.000|0.999|0.994|0.008|0.008
(4, 6)|10|0.984|1.000|0.999|0.996|0.005|0.005
(4, 7)|10|0.000|1.000|0.834|0.671|0.373|0.555
(4, 8)|10|0.000|1.000|0.990|0.846|0.316|0.373
(5, 6)|10|0.969|1.000|0.999|0.994|0.009|0.009
(5, 7)|10|0.000|1.000|0.832|0.671|0.373|0.556
(5, 8)|10|0.000|1.000|0.990|0.846|0.316|0.373
(6, 7)|10|0.000|1.000|0.831|0.671|0.373|0.556
(6, 8)|10|0.000|1.000|0.990|0.846|0.316|0.373
(7, 8)|10|0.086|1.000|0.830|0.721|0.306|0.425

TOP 100
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|99|0.939|1.000|0.999|0.996|0.009|0.009
(0, 2)|99|0.167|1.000|0.999|0.974|0.107|0.110
(0, 3)|99|0.172|1.000|0.999|0.981|0.096|0.098
(0, 4)|99|0.172|1.000|0.999|0.982|0.096|0.098
(0, 5)|99|0.172|1.000|0.999|0.987|0.083|0.084
(0, 6)|100|0.172|1.000|0.999|0.987|0.082|0.084
(0, 7)|98|0.000|1.000|0.991|0.784|0.296|0.378
(0, 8)|100|0.000|1.000|0.996|0.940|0.185|0.197
(1, 2)|99|0.167|1.000|0.999|0.974|0.107|0.110
(1, 3)|99|0.172|1.000|0.999|0.982|0.096|0.098
(1, 4)|98|0.172|1.000|0.999|0.982|0.097|0.098
(1, 5)|98|0.172|1.000|0.999|0.987|0.083|0.084
(1, 6)|99|0.172|1.000|0.999|0.988|0.083|0.084
(1, 7)|97|0.000|1.000|0.990|0.782|0.297|0.380
(1, 8)|99|0.000|1.000|0.996|0.940|0.186|0.198
(2, 3)|99|0.167|1.000|0.999|0.970|0.125|0.128
(2, 4)|98|0.167|1.000|0.999|0.970|0.126|0.130
(2, 5)|98|0.166|1.000|0.999|0.965|0.134|0.139
(2, 6)|99|0.167|1.000|0.999|0.966|0.133|0.138
(2, 7)|97|0.000|1.000|0.987|0.759|0.301|0.396
(2, 8)|99|0.000|1.000|0.995|0.918|0.208|0.227
(3, 4)|98|0.950|1.000|0.999|0.995|0.010|0.010
(3, 5)|98|0.498|1.000|0.999|0.991|0.051|0.051
(3, 6)|99|0.498|1.000|0.999|0.990|0.051|0.051
(3, 7)|97|0.000|1.000|0.989|0.784|0.292|0.373
(3, 8)|99|0.000|1.000|0.997|0.943|0.175|0.186
(4, 5)|98|0.498|1.000|0.999|0.990|0.051|0.051
(4, 6)|99|0.498|1.000|0.999|0.991|0.050|0.051
(4, 7)|97|0.000|1.000|0.990|0.785|0.292|0.372
(4, 8)|99|0.000|1.000|0.997|0.943|0.175|0.186
(5, 6)|99|0.929|1.000|0.999|0.995|0.010|0.010
(5, 7)|97|0.000|1.000|0.990|0.790|0.291|0.369
(5, 8)|99|0.000|1.000|0.997|0.948|0.169|0.179
(6, 7)|98|0.000|1.000|0.990|0.792|0.290|0.367
(6, 8)|100|0.000|1.000|0.997|0.949|0.169|0.178
(7, 8)|98|0.086|1.000|0.992|0.817|0.265|0.325

TOP 1000
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|991|0.170|1.000|1.000|0.996|0.033|0.033
(0, 2)|989|0.167|1.000|1.000|0.990|0.064|0.065
(0, 3)|991|0.010|1.000|1.000|0.994|0.051|0.051
(0, 4)|990|0.010|1.000|1.000|0.994|0.052|0.052
(0, 5)|991|0.172|1.000|1.000|0.996|0.033|0.033
(0, 6)|991|0.172|1.000|1.000|0.997|0.032|0.032
(0, 7)|982|0.000|1.000|1.000|0.909|0.210|0.231
(0, 8)|989|0.000|1.000|1.000|0.985|0.092|0.093
(1, 2)|988|0.167|1.000|1.000|0.989|0.068|0.068
(1, 3)|992|0.008|1.000|1.000|0.993|0.056|0.056
(1, 4)|988|0.008|1.000|1.000|0.993|0.056|0.057
(1, 5)|990|0.170|1.000|1.000|0.996|0.038|0.038
(1, 6)|992|0.169|1.000|1.000|0.996|0.038|0.039
(1, 7)|981|0.000|1.000|1.000|0.907|0.211|0.233
(1, 8)|988|0.000|1.000|1.000|0.985|0.090|0.091
(2, 3)|988|0.034|1.000|1.000|0.990|0.067|0.068
(2, 4)|986|0.034|1.000|1.000|0.990|0.068|0.068
(2, 5)|987|0.166|1.000|1.000|0.989|0.068|0.068
(2, 6)|987|0.167|1.000|1.000|0.989|0.067|0.068
(2, 7)|978|0.000|1.000|1.000|0.901|0.216|0.239
(2, 8)|986|0.000|1.000|1.000|0.976|0.111|0.113
(3, 4)|988|0.672|1.000|1.000|0.997|0.015|0.015
(3, 5)|990|0.008|1.000|1.000|0.995|0.042|0.042
(3, 6)|991|0.008|1.000|1.000|0.996|0.041|0.041
(3, 7)|981|0.000|1.000|1.000|0.907|0.211|0.233
(3, 8)|988|0.000|1.000|1.000|0.983|0.097|0.099
(4, 5)|988|0.008|1.000|1.000|0.995|0.042|0.043
(4, 6)|988|0.008|1.000|1.000|0.995|0.041|0.042
(4, 7)|979|0.000|1.000|1.000|0.907|0.211|0.233
(4, 8)|986|0.000|1.000|1.000|0.983|0.097|0.099
(5, 6)|990|0.720|1.000|1.000|0.998|0.011|0.011
(5, 7)|981|0.000|1.000|1.000|0.909|0.209|0.230
(5, 8)|988|0.000|1.000|1.000|0.985|0.090|0.091
(6, 7)|981|0.000|1.000|1.000|0.909|0.209|0.230
(6, 8)|988|0.000|1.000|1.000|0.985|0.089|0.091
(7, 8)|986|0.002|1.000|1.000|0.913|0.206|0.225

TOP 10000
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|9940|0.000|1.000|1.000|0.995|0.052|0.052
(0, 2)|9938|0.000|1.000|1.000|0.992|0.065|0.066
(0, 3)|9940|0.000|1.000|1.000|0.993|0.061|0.062
(0, 4)|9937|0.000|1.000|1.000|0.994|0.059|0.060
(0, 5)|9939|0.000|1.000|1.000|0.995|0.053|0.054
(0, 6)|9940|0.000|1.000|1.000|0.994|0.055|0.055
(0, 7)|9895|0.000|1.000|1.000|0.944|0.176|0.186
(0, 8)|9924|0.000|1.000|1.000|0.990|0.074|0.075
(1, 2)|9935|0.002|1.000|1.000|0.993|0.057|0.057
(1, 3)|9938|0.001|1.000|1.000|0.994|0.054|0.054
(1, 4)|9931|0.003|1.000|1.000|0.994|0.055|0.056
(1, 5)|9936|0.002|1.000|1.000|0.996|0.046|0.047
(1, 6)|9935|0.000|1.000|1.000|0.995|0.050|0.050
(1, 7)|9893|0.000|1.000|1.000|0.944|0.176|0.187
(1, 8)|9919|0.000|1.000|1.000|0.991|0.072|0.072
(2, 3)|9939|0.001|1.000|1.000|0.994|0.054|0.054
(2, 4)|9939|0.002|1.000|1.000|0.994|0.055|0.056
(2, 5)|9938|0.004|1.000|1.000|0.993|0.059|0.060
(2, 6)|9933|0.000|1.000|1.000|0.992|0.064|0.064
(2, 7)|9895|0.000|1.000|1.000|0.942|0.178|0.189
(2, 8)|9920|0.000|1.000|1.000|0.987|0.084|0.085
(3, 4)|9940|0.001|1.000|1.000|0.996|0.046|0.046
(3, 5)|9949|0.001|1.000|1.000|0.995|0.056|0.056
(3, 6)|9942|0.000|1.000|1.000|0.994|0.055|0.056
(3, 7)|9904|0.000|1.000|1.000|0.942|0.178|0.189
(3, 8)|9927|0.000|1.000|1.000|0.989|0.077|0.078
(4, 5)|9943|0.002|1.000|1.000|0.995|0.052|0.053
(4, 6)|9940|0.000|1.000|1.000|0.995|0.050|0.050
(4, 7)|9902|0.000|1.000|1.000|0.943|0.177|0.187
(4, 8)|9929|0.000|1.000|1.000|0.990|0.077|0.077
(5, 6)|9945|0.000|1.000|1.000|0.995|0.048|0.049
(5, 7)|9911|0.000|1.000|1.000|0.944|0.174|0.184
(5, 8)|9934|0.000|1.000|1.000|0.991|0.071|0.071
(6, 7)|9902|0.000|1.000|1.000|0.944|0.174|0.185
(6, 8)|9933|0.000|1.000|1.000|0.991|0.071|0.072
(7, 8)|9907|0.000|1.000|1.000|0.944|0.175|0.185

TOP 100000
Num|UA
------------ | -------------
0 | Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0
1 | Mozilla/5.0 (Linux; rv:44.0) Gecko/20100101 Firefox/44.0
2 | Mozilla/5.0 (rv:44.0) Gecko/20100101 Firefox/44.0
3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
7 | Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
8 | Mozilla/5.0 (Linux; GoogleTV 3.2; NSZ-GS7/GX70 Build/MASTER) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.77 Safari/534.24

Pair|N|Min|Max|Median|Mean|StDev|CoV
-------------|-------------|-------------|-------------|-------------|-------------|-------------|-------------
(0, 1)|89946|0.000|1.000|1.000|0.996|0.047|0.047
(0, 2)|89932|0.000|1.000|1.000|0.994|0.057|0.057
(0, 3)|89945|0.000|1.000|1.000|0.995|0.056|0.056
(0, 4)|89934|0.000|1.000|1.000|0.995|0.054|0.054
(0, 5)|89941|0.000|1.000|1.000|0.996|0.049|0.049
(0, 6)|89950|0.000|1.000|1.000|0.995|0.051|0.051
(0, 7)|89555|0.000|1.000|1.000|0.961|0.149|0.155
(0, 8)|89859|0.000|1.000|1.000|0.992|0.067|0.068
(1, 2)|89931|0.000|1.000|1.000|0.995|0.052|0.052
(1, 3)|89939|0.000|1.000|1.000|0.995|0.051|0.051
(1, 4)|89932|0.001|1.000|1.000|0.995|0.051|0.052
(1, 5)|89943|0.000|1.000|1.000|0.996|0.046|0.046
(1, 6)|89945|0.000|1.000|1.000|0.996|0.047|0.047
(1, 7)|89555|0.000|1.000|1.000|0.962|0.148|0.154
(1, 8)|89854|0.000|1.000|1.000|0.992|0.068|0.069
(2, 3)|89949|0.000|1.000|1.000|0.995|0.050|0.050
(2, 4)|89953|0.000|1.000|1.000|0.995|0.049|0.049
(2, 5)|89942|0.000|1.000|1.000|0.995|0.054|0.054
(2, 6)|89944|0.000|1.000|1.000|0.994|0.057|0.057
(2, 7)|89585|0.000|1.000|1.000|0.960|0.151|0.157
(2, 8)|89850|0.000|1.000|1.000|0.991|0.073|0.074
(3, 4)|89959|0.000|1.000|1.000|0.996|0.049|0.050
(3, 5)|89965|0.000|1.000|1.000|0.995|0.052|0.053
(3, 6)|89977|0.000|1.000|1.000|0.995|0.053|0.053
(3, 7)|89587|0.000|1.000|1.000|0.961|0.150|0.156
(3, 8)|89878|0.000|1.000|1.000|0.991|0.072|0.073
(4, 5)|89974|0.000|1.000|1.000|0.995|0.052|0.052
(4, 6)|90007|0.000|1.000|1.000|0.995|0.051|0.051
(4, 7)|89623|0.000|1.000|1.000|0.961|0.150|0.156
(4, 8)|89922|0.000|1.000|1.000|0.992|0.070|0.071
(5, 6)|89983|0.000|1.000|1.000|0.996|0.046|0.046
(5, 7)|89619|0.000|1.000|1.000|0.962|0.148|0.154
(5, 8)|89897|0.000|1.000|1.000|0.992|0.067|0.067
(6, 7)|89660|0.000|1.000|1.000|0.962|0.148|0.154
(6, 8)|89955|0.000|1.000|1.000|0.992|0.067|0.068
(7, 8)|89604|0.000|1.000|1.000|0.961|0.150|0.156
Though I'm not an expert of webcompat but here is my 2 cents after analyzing results in comment #34 and comment #35:

1. UA strings that contains |Linux; TV| get more similar pages to desktop and the 2nd place are those contains only |TV|.

2. UA strings that contains |Linux; TV| get more similar pages to Tizen TV and Google TV.
Thanks John!

These two UAs receive VERY similar results. So it looks like the Desktop-ish vs Mobile-ish Gecko token doesn't matter much, once you get into top 100+.

3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
4 | Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0

The same trend holds for:

5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0

Comparing 3 and 5:

3 | Mozilla/5.0 (TV; rv:44.0) Gecko/20100101 Firefox/44.0
5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0

5 gets better results, better being closer to Samsung and GoogleTV.

And between 5 and 6, it's nearly identical, I don't think it makes a difference Gecko/20100101 vs Gecko/44.0.

Results between 0 and 5 and 0 and 6 are pretty close, but 0 never does better so I would rule it out on the basis that it's longer.

And both 1 and 2 are slightly less similar to 7 and 8 than 6.

So yeah, pretty much with schien said in Comment #36. I would suggest we go with either:

5 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/20100101 Firefox/44.0
6 | Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0

No preference between the two, I don't see that it makes a difference.

Gerv, thoughts?
Flags: needinfo?(gerv)
Possibly more work, but just in case: do your TV customers (LG? other? lost track) have a list of most popular TV-optimised sites that they know of (assuming they had previous models with some form of browser)? It may be that these sites are not in the top-100 list, or reside on a completely separate URL?
Note from 2015-10-14 16:10:06.024

I looked at the top 100 only, for the reason given in the first bullet. I think these data demonstrate the following:

* UA sniffing is practiced much more by big sites than small ones; when you include the small ones, the changes get drowned out.

* The desktop-vs-mobile split with the Gecko version numbers makes very little difference, so let's go with the mobile one (Gecko/44.0) as it's what we are trying to migrate to.

* Adding in "Linux" to the "TV" string does make some difference, but not much. The problem with specifying an OS is that you get offered software downloads, which we don't necessarily want. (Although this is less of a problem with Linux than with, say, Android.) With Firefox OS, we have established that no OS -> no software downloads. So given that it doesn't make much odds, I think we should not put this in.

* Interestingly, the Samsung Smart TV and the Google TV get very different content, despite both being based on Webkit. Perhaps it's the presence of "Chrome"? It might be worth digging into why, and whether we want to aim for the content the Samsung TV gets or the content the Google TV gets.

So at the moment, I think we should use either string 2 (but with a Gecko/44.0 geckoversion) or string 4, depending on whether the presence of "TV" makes much difference on sites which are specifically supposed to be designed for TVs. I think we should do further investigation on that, based on any information we get about TV-optimised sites (see comment 38).

miketaylr wrote:
> 5 gets better results [over 3], better being closer to Samsung and GoogleTV.

But the difference is pretty marginal, it seems to me. Anyway, is adding "Linux" to the string going to make it more likely that we get content suitable for a TV? Or are we just going to see changes we don't mind about?

Gerv
Flags: needinfo?(gerv)
(In reply to Gervase Markham [:gerv] from comment #39)
> * UA sniffing is practiced much more by big sites than small ones; when you
> include the small ones, the changes get drowned out.

I see your point, but anything above top 100 isn't exactly a small site.

> * The desktop-vs-mobile split with the Gecko version numbers makes very
> little difference, so let's go with the mobile one (Gecko/44.0) as it's what
> we are trying to migrate to.

Seems fair.
 
> * Adding in "Linux" to the "TV" string does make some difference, but not
> much. The problem with specifying an OS is that you get offered software
> downloads, which we don't necessarily want. (Although this is less of a
> problem with Linux than with, say, Android.) With Firefox OS, we have
> established that no OS -> no software downloads. So given that it doesn't
> make much odds, I think we should not put this in.

I don't agree with this. We had to backpeddle the decision to not add the Android platform token to the Fennec UA string because it turned out to break more sites than we anticipated. We're trying to identify as a TV here, and the vast majority of TV UA strings from <https://udger.com/resources/ua-list/device-detail?device=Smart+TV> have "Linux". Being different is not what we want, if the goal is to get the right content. The more we look like a "Smart TV", the better.

> * Interestingly, the Samsung Smart TV and the Google TV get very different
> content, despite both being based on Webkit. Perhaps it's the presence of
> "Chrome"? It might be worth digging into why, and whether we want to aim for
> the content the Samsung TV gets or the content the Google TV gets.
> 
> So at the moment, I think we should use either string 2 (but with a
> Gecko/44.0 geckoversion) or string 4, depending on whether the presence of
> "TV" makes much difference on sites which are specifically supposed to be
> designed for TVs. I think we should do further investigation on that, based
> on any information we get about TV-optimised sites (see comment 38).

2 suffers from the problem of not containing a platform or OS token, which I fear will break UA parsers that are looking for such. It also doesn't have the string "TV" which is too different from all the others.

> miketaylr wrote:
> > 5 gets better results [over 3], better being closer to Samsung and GoogleTV.
> 
> But the difference is pretty marginal, it seems to me. Anyway, is adding
> "Linux" to the string going to make it more likely that we get content
> suitable for a TV? Or are we just going to see changes we don't mind about?

The problem with downplaying marginal differences is that the dataset is N=100. The difference can mean getting the right content for one or two of the most visited sites (the twitters, facebooks, youtubes, etc.). In any event, either option is better than getting content that we don't want. 

That said, I'll update my recs to one of the following, if we're trying to get away from the old Gecko/20100101. Both seem good enough™:

4| Mozilla/5.0 (TV; rv:44.0) Gecko/44.0 Firefox/44.0
6| Mozilla/5.0 (Linux; TV; rv:44.0) Gecko/44.0 Firefox/44.0
I absolutely agree we need to have a "TV" token in there.

I also agree that having "Linux" in there doesn't seem to create a lot of harm. I can't looked at the data enough to have an opinion about if it creates good, but if it does, I think we should do it.
I'll pick #4 for now. Adding |Linux| in the UA string can be used on web sites that have compatibility issue as a temporary fix. We can add |Linux| (or whatever future platform) in default UA string if we get evidence that the platform token is mandatory to general web sites.
https://github.com/mozilla-b2g/gaia/commit/0aba376ce57c9d2a4fbd03ff5b1da6144131cbac
Status: NEW → RESOLVED
Closed: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S9 (16Oct)
QA Whiteboard: [COM=TV Browser]
Blocks: 1227968
STR:
 1. Launch Browser App
 2. Go to www.yahoo.com 

Actual: 
 - Browser always redirects your website to its mobile version ( https://tw.m.yahoo.com/ )
 - Please watch the video

Expected:
 - Browser should not redirects your website to its mobile version

Note:
 - For Firefox Nightly in Mac, it will go to https://tw.yahoo.com/?p=us
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file video
Branch master
Commit 7538cc11df132760010545f54379234a1862a8ae
Merge: 2e5f63b 43f67ab
Author: Ricky Chien <rickychien@users.noreply.github.com>
Date:   Wed Nov 25 18:38:29 2015 +0800
(In reply to Cynthia Tang [:cynthiatang] from comment #48)
> STR:
>  1. Launch Browser App
>  2. Go to www.yahoo.com 
> 
> Actual: 
>  - Browser always redirects your website to its mobile version (
> https://tw.m.yahoo.com/ )
>  - Please watch the video
> 
> Expected:
>  - Browser should not redirects your website to its mobile version
> 
> Note:
>  - For Firefox Nightly in Mac, it will go to https://tw.yahoo.com/?p=us

Are you testing with Nexus 5 + TV Gaia? In comment #7 I clearly exclude the TV UA string for such kind of usage because it is a temporary test environment.
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #50)
> (In reply to Cynthia Tang [:cynthiatang] from comment #48)
> > STR:
> >  1. Launch Browser App
> >  2. Go to www.yahoo.com 
> > 
> > Actual: 
> >  - Browser always redirects your website to its mobile version (
> > https://tw.m.yahoo.com/ )
> >  - Please watch the video
> > 
> > Expected:
> >  - Browser should not redirects your website to its mobile version
> > 
> > Note:
> >  - For Firefox Nightly in Mac, it will go to https://tw.yahoo.com/?p=us
> 
> Are you testing with Nexus 5 + TV Gaia? In comment #7 I clearly exclude the
> TV UA string for such kind of usage because it is a temporary test
> environment.

Oh sorry I didn't realize the test target is yahoo.com this time. This is a webcompat issue and we should reach out to Yahoo engineering team. This should be track by bug 1227968 separately.
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Update the bug title to match what we did.
Summary: [TV 2.5][Browser] Browser always redirects your website to its mobile version → [TV 2.5][Browser] Decide the proper UA string for TV
No longer blocks: 1227968
You need to log in before you can comment on or make changes to this bug.