Get number of CPU cores in JavaScript?
Is there a way to determine the number of available CPU cores in JavaScript, so that you could adjust the number of web workers depending on that? Yes, navigator.hardwareConcurrency . Supported natively in Chrome, Firefox, Edge, Opera, and Webkit; supported in all browsers with a polyfill . No, there isn't, unless you use some ActiveX. You can try to estimate the number of cores with: https://github.com/oftn/core-estimator demo: http://eligrey.com/blog/post/cpu-core-estimation-with-javascript Here's a fairly quick concurrency estimator I hacked together... it hasn't undergone much testing yet: