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

How It Works

Dori Smith (www.dori.com) of WaSP invented the DOM sniff in early 2001 as a means of implementing that group's Browser Upgrade Campaign (discussed in Chapter 4, “XML Conquers the World [And Other Web Standards Success Stories]”). But it can be used for any purpose, in most cases replacing complicated browser detection scripts that are nearly impossible to keep up-to-date.

The way the DOM sniff works is simple. After you create a valid page, insert the following script in the <head> of your document or somewhere in a linked JavaScript (.js) file:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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