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

Why It Works

The DOM sniff is binary, a toggle, no more complicated than an on-off switch. Because getElementById is a DOM method, conformant browsers skip right past it. By contrast, browsers that do not recognize getElementById are not DOM-compliant and will obey the redirect, thus being taken to a page whose content they can understand.

JavaScript redirects disable the Back button, and this is not friendly. But you do not need to follow the DOM sniff with window.location. You can follow the DOM sniff with any command you determine to be in your users' best interest.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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