• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 18. navigator > Browser Sniffing, the Incorrect Way

Browser Sniffing, the Incorrect Way

A common practice by many Web designers is to detect a browser by the objects it supports. For instance, if you are running Netscape 4, it has the document.layers object. If you are running Internet Explorer 4+, it has the document.all object.

Many people have assumed this means a browser having the document.layers object is a Netscape browser. Likewise, they have assumed a browser having the document.all object is a Microsoft Internet Explorer browser (see Listing 18.1).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint