views:

84

answers:

5

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

+4  A: 

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.

Daniel Vassallo
+1  A: 

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.

Nick Craver
none of that information is available to Flash.
Allan
@Allan - Flash is more adept to say run your own CPU benchmark, etc.
Nick Craver
@Nick Craver - sorry I am not sure what you mean?
Allan
@Allan - If you're looking for capabilities, such as doing a speed test of CPU or even bandwidth is much more feasible in flash.
Nick Craver
@Nick Craver - ok yes. What disadvantages is there of doing speed tests in JavaScript? Is it a less controllable environment?
Allan
@Allan - exactly, performance differs amongst JavaScript engines, it *very* widely varies, flash you can do a more accurate test in.
Nick Craver
+2  A: 

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

Ruel
Asking the user to input the data isn't really "detecting" :)
Nick Craver
Yep, that's why I said detecting is not possible. :)
Ruel
+1  A: 

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.

steven_desu
+1  A: 

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

Dr.Molle