If you are not IE, you must be Netscape 4!

A consequence of Netscape 4 loosing the browser war is that their JavaScript DOM is best avoided. They used something called document.layers to access parts of the page. Today most new scripts will luckily be using W3 DOM compatible-methods and only resort to document.layers if they absolutely want to support Netscape 4.

That means, if you want to do browser detection you should detect those browsers that require special treatment (mainly IE 4.x and Netscape 4.x), and give all others W3 DOM compatible scripts.

Over at <http://gettyimages.com/> they haven't heard of Opera. And worse, if they haven't heard of you they send you the fallback-code for Netscape 4! Identify as Opera and surf over there to witness the ugly result..

Advertisements

2 thoughts on “If you are not IE, you must be Netscape 4!

  1. I did as you suggested, Opera 7.50, identified as MSIE 6.0, and http://gettyimages.com/ looks the same as when viewed with IE 6.0. I'm guessing someone saw your post and fixed the web page, or I've done something wrong and am not seeing the problem as you are.


    Kent

  2. 1) you need to ID as *Opera* to see the problem

    2) the site may be storing your browser ID in a session profile or something. That means it will remember your setting from first time you go there until you delete cookies and/or restart Opera.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s