BeYourOwnGod
BeYourOwnGod

Reputation: 2425

Can I detect cpu type and speed, and/or amount of ram a computer has from a web page (javascript hopefully)?

Can I detect cpu type and speed, and/or amount of ram a computer has from a web page (javascript hopefully)?

Upvotes: 14

Views: 16625

Answers (7)

skipper21
skipper21

Reputation: 2445

It is not possible to detect CPU type and speed. But you can find number of cores and CPU manufacturer information. You can figure out system performance based on number of CPU cores. Number of cores is directly proportional to performance. Higher core machine gives good performance.

navigator.hardwareConcurrency shows the number of CPU cores, but it works only on chrome.

navigator.hardwareConcurrency

navigator.userAgent gives the complete OS and browser information.

navigator.userAgent
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"

navigator.platform shows System info

navigator.platform
"MacIntel"

Hope this helps.

Upvotes: 6

Bryan Grace
Bryan Grace

Reputation: 1882

If your end goal is doing different actions based on the whether or not they'll render fast/correctly on the users comp, you could time certain keystone processes and run different processes based on the result.

Upvotes: 0

Dr.Molle
Dr.Molle

Reputation: 117334

In IE you can detect the cpuClass. It doesn't tell you much, but maybe there is any use for you.

http://msdn.microsoft.com/en-us/library/ms533697%28v=VS.85%29.aspx

Upvotes: 1

stevendesu
stevendesu

Reputation: 16801

The only thing with any knowledge of the system on which it's running is the Operating System. The Operating System creates an abstraction layer in which every application runs. Applications can't know what processor you have or how much RAM you have without asking the Operating System. No modern browser will ask.

The Java Virtual Machine does ask the Operating System, so you could do it with a Java applet.

Otherwise you'd need a browser plugin.

Upvotes: 5

Ruel
Ruel

Reputation: 15780

Nope, that's not possible. Unless you're going to ask the user, programmatically.

Upvotes: 1

Nick Craver
Nick Craver

Reputation: 630439

This info isn't available, at least not in a consistent or reliable way using only JavaScript...flash may be an option, but there are many security restrictions around that too, so I'm not sure what's available to it.

Upvotes: 2

Daniel Vassallo
Daniel Vassallo

Reputation: 344351

No, that's not possible. There is no access to hardware information through JavaScript in web browsers. You might have some luck using browser plugins, ActiveX, etc.

Upvotes: 8

Related Questions