tjhorne
Status: New User - Welcome
Joined: 08 Jul 2005
Posts: 2
Back to top
Posted: Jul 8, 05, 5:07    Detecting OS w/ Javascript
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
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Back to top
Posted: Jul 8, 05, 9:11    
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
tjhorne
Status: New User - Welcome
Joined: 08 Jul 2005
Posts: 2
Back to top
Posted: Jul 8, 05, 10:39    Read my post again
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.
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Back to top
Posted: Jul 8, 05, 10:45    
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.
Display posts from previous:   

All times are GMT - 8 Hours