[thelist] Browser Detection
Andrew Forsberg
andrew at thepander.co.nz
Thu Feb 22 18:25:44 CST 2001
>what do you mean by how am I getting the name and version variables?
>The code that I pasted is all I have. Please let me know how to fix
>this.
>
Mozilla.org has a page which describes how to do this at length --
still, you probably don't want a script which excludes every browser
that isn't either Netscape or IE, since most of them will probably
work just fine.
Netscape's 'Ultimate JavaScript Client Sniffer' is available at:
http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
Also, be prepared for browsers that either don't have a working
javascript implementation, or users who have turned their javascript
engine off. You'll probably want to have a
<META http-equiv="refresh" content="10; url=nojavascript.html">
redirect of some sort to avoid these users just getting stuck on a blank page.
Hope that helps,
Andrew
PS - the 'ultimate client sniffer' page itself just choked on my IE 5
(mac) browser... so you'll want to check how successful it really is
on several different browsers.
--
Andrew Forsberg
http://www.thepander.co.nz
More information about the thelist
mailing list