On May 3, 2014, at 10:49 AM, Adam Barth <w...@adambarth.com> wrote: > Over on blink-dev, we've been discussing  adding a property to navigator > that reports the number of cores . As far as I can tell, this > functionality exists in every other platform (including iOS and Android). > Some of the use cases for this feature have been discussed previously on > this mailing list  and rejected in favor of a more complex system, > perhaps similar to Grand Central Dispatch . Others have raised concerns > that exposing the number of cores could lead to increased fidelity of > fingerprinting . > > My view is that the fingerprinting risks are minimal. This information is > already available to web sites that wish to spend a few seconds probing > your machine . Obviously, exposing this property makes that easier and > more accurate, which is why it's useful for developers. > > IMHO, a more complex worker pool system would be valuable, but most systems > that have such a worker pool system also report the number of hardware > threads available. Examples: > > C++: > std::thread::hardware_concurrency(); > > Win32: > GetSystemInfo returns dwNumberOfProcessors > > POSIX: > sysctl returns HW_AVAILCPU or HW_NCPU > > Java: > Runtime.getRuntime().availableProcessors(); > > Python: > multiprocessing.cpu_count() > > In fact, the web was the only platform I could find that didn't make the > number of cores available to developers.
FWIW, this property has been added to WebKit  and Blink  although that's not an indication of any browser actually shipping it for WebKit.  http://trac.webkit.org/changeset/169017  https://src.chromium.org/viewvc/blink?revision=175629&view=revision - R. Niwa