Detecting OS w/ Javascript
tjhorne
Status: New User - Welcome
Joined: 08 Jul 2005
Posts: 2
Reply Quote
I am currently not using a Webserver that would allow me to use PHP.

Is there a Javascript that you know of that would detect what OS a user is running and display it in the browser?

Thanks
Back to top
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
Yes, we have a javascript browser detector. Of course it isn't as robust as the PHP one, since if a browser doesn't support javascript, it can't be detected, but this one does the job fine for most uses. Just remember that page functionality should not depend too much on any javascript since users can and do have their javascript turned off
Back to top
Read my post again
tjhorne
Status: New User - Welcome
Joined: 08 Jul 2005
Posts: 2
Reply Quote
I am not looking for a browser detection script, I am looking for a script that can detect what "Operating System" a user is running and display it in the browser window.
Back to top
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
If you had looked at that script before replying you'd see that it detects what operating system the visitor is using. It doesn't do very precise OS detection, mainly because with JS there's almost no practical reason to do that, but it does detect the main ones.

If you wanted to refine the OS detection you could just translate the logic of the php browser detection script into javascript. Or not.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours