|
January 23, 2001 A Short Browser Sniffer Tips: January 2001
Yehuda Shiran, Ph.D.
|
|
Until Netscape 6 and Internet Explorer 5.x are fully deployed, we need to support Netscape Navigator 4.x and Internet Explorer 4.x. The four lines below identifies which browser you are running on. Internet Explorer 4.x is detected by having the document.all object, and by not supporting the document.getElementById method. Netscape Navigator 4.x is recognized by having the document.layers object. Internet Explorer 5.x has the document.all object and supports the document.getElementById method. Netscape 6 supports the document.getElementById method and does not have the document.all object. Here is the code:
Click the button below to find the browser name:
People who read this tip also read these tips: Look for similar tips by subject: |