Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q899 How can I find out the Operating System of the client?

You are here: irt.org | FAQ | JavaScript | Misc | Q899 [ previous next ]

Its within the navigator objects userAgent property:

<script language="JavaScript"><!--
alert(navigator.userAgent);
//--></script>

To get it you'll have to parse the field for certain values.

The "Ultimate JavaScript Client Sniffer" at http://developer.netscape.com/docs/examples/javascript/browser_type.html will show you how to detect for all platforms.

©2018 Martin Webb