Javascript User Agent Detection

Thursday June 3rd, 1999

Eric Krock of Netscape wrote to me and asked that I make this request to mz's readers:

Apparently there are many people out there using User Agent detection scripts that not only fail to detect IE5 and Mozilla (what will be Communicator5), but fail to detect that scripts meant for IE4 and Nav4 would also work in the 5.0 browsers. Netscape has created a more up-to-date client sniffer, and is requesting that people mention it in the signature area of their email messages - sort of a grass-roots way of getting the message out that User Agent detection has to be updated. Here's the recommended message:

Is your JavaScript ready for Nav5 and IE5?
Get the latest JavaScript client sniffer at

I've enabled the link in the sig above solely so you can visit the page and see it for yourself...

#14 Re:Javascript User Agent Detection

by Anon

Friday June 4th, 1999 11:40 PM

You are replying to this message

Actually the document.all and document.layers test are the most widely used method of checking for 4+ browser, but they are also the cause of many problems!!! For example the Mac and PC versions of IE4+ are different so using a simple document.all check will not do you any good. Not only that but IE4 and IE5 have compatibility issues that cause a simple document.all check to fail. Object checking is great for some things (like document.images) but browser checking is an inevitable part of writing JavaScript and will be for some time to come.