New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 602611 link

Starred by 4 users

Issue metadata

Status: ExternalDependency
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Compat



Sign in to add a comment

Consider adding navigator.oscpu for interop with Gecko

Reported by sim...@opera.com, Apr 12 2016

Issue description

See https://github.com/whatwg/html/pull/1017

Apparently Gecko is unable to remove navigator.oscpu, but it might be possible for other browsers to add it.
 

Comment 1 by phil...@opera.com, Apr 12 2016

See https://github.com/whatwg/html/pull/1017#issuecomment-208351660 for what kind of value it would have to return.

Comment 2 by tkent@chromium.org, Apr 22 2016

Components: -Blink>DOM Blink>HTML
Cc: dominicc@chromium.org
Owner: domenic@chromium.org
Domenic, what is "Gecko compatibility mode" and do we/should we implement it?

Comment 4 by phil...@opera.com, Apr 25 2016

That refers to https://html.spec.whatwg.org/#concept-navigator-compatibility-mode in the Gecko state, but Blink should be in the Chrome bucket.

The original idea of the issue was to expose navigator.oscpu only in Gecko (thus the title) but now the question is whether it's web compatible for all other vendors to add it instead, so that we reach interop at least.
Right. Navigator compatibility mode comes out of the fact that we know that there are two web-compatible combinations for various properties of navigator:

- Chrome/WebKit compatibility modes: navigator.productSub = "20030107", navigator.vendor = "Google Inc." or "Apple Computer, Inc.", and no navigator.taintEnabled()
- Gecko compatibility mode: navigator.productSub = "20100101", navigator.vendor = "", and navigator.taintEnabled() always returning false.

We recently added navigator.oscpu to the Gecko mode since only Gecko implements it. However, we don't have compatibility data saying that it's not web-compatible for Chrome/WebKit-emulating browsers to implement navigator.oscpu (like we do for taintEnabled).

Simon and Philip are wondering if it's possible for everyone to implement navigator.oscpu, so that it's no longer part of Gecko compatibility mode but instead just part of the shared Navigator interface that everyone uses.
Owner: ----

Comment 7 by rbyers@chromium.org, May 20 2016

I'd support implementing this trivial API for better interop (assuming httparchive says it's used on a non-trivial number of pages, and other vendors were willing to add it).  If it's web compatible then I'd prefer the empty string, just to reduce the interop risk of the format of the string changing.  But if there was a useful subset of the UA string where the interop risk would be similarly low then perhaps that would be better (at least the API would have some use).

Comment 8 by rbyers@chromium.org, May 20 2016

Any discussion / bugs with the other vendors yet?

Comment 9 by sim...@opera.com, May 23 2016

I haven't filed this for other browsers yet, would like to have a better understanding and a plan first.

I don't think making it the empty string is helpful, since it doesn't match what Gecko does (and probably breaks as much for them as removing it altogether).

https://github.com/whatwg/html/pull/1017#issuecomment-208351660 explains what the value is in Gecko.

IE (and Edge?) has navigator.cpuClass instead. https://msdn.microsoft.com/sv-se/hh770702

Checking httparchive...

SELECT COUNT(*) AS num, url
FROM [httparchive:har.2016_05_01_chrome_requests_bodies]
WHERE body CONTAINS 'navigator.oscpu'
GROUP BY url
ORDER BY num DESC

2407 unique resources, most common is	http://ads.pubmatic.com/AdServer/js/showad.js (used by 7202 pages). It seems almost all usage is for fingerprinting. Sometimes fall back to navigator.cpuClass or navigator.platform.


http://s.pm.naver.net/js/c/ntop1_20160319.min.js seems to use oscpu as part of a Mac OS X version check for installing a toolbar for Firefox...

function macOSXVerCheck(){if(navigator.platform.indexOf("MacIntel")==-1||!navigator.oscpu){return false}var c="Intel Mac OS X";var d=navigator.oscpu;var b=d.indexOf(c);if(b==-1){return false}var a=d.substr(c.length);
if(a>=10.5){return true}return false}function ff_toolbar_install(a){var c="http://cdn.naver.com/naver/toolbar/firefox/winnt_x86/naver_toolbar_win.xpi";if($Agent().os().mac){if(macOSXVerCheck()){c="http://cdn.naver.com/naver/toolbar/firefox/darwin_x86/naver_toolbar_mac.xpi"
}else{alert("Mac OS X 10.5 이상인 경우에만 네이버 Firefox 툴바를 사용하실 수 있습니다");a.close();return false}}

Comment 10 by tkent@chromium.org, Jun 10 2016

Status: ExternalDependency (was: Untriaged)
Cc: foolip@chromium.org
Cc: -phil...@opera.com

Sign in to add a comment