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

Chapter 27. Cross-Browser Dynamic HTML > Browser Detection Scripts

Browser Detection Scripts

Before we turn our attention to Cross-Browser Dynamic HTML (which, for the sake of brevity, we will abbreviate CBDHTML), one more topic should be discussed. The key to developing HTML documents that implement CBDHTML functions correctly on multiple browsers and platforms and that degrade gracefully on older or third-party browsers is the capability to successfully detect the Web browser being used. Again, many solutions are freely available that solve this problem; one of the most extensive is Netscape's Ultimate JavaScript Client Sniffer, which you can download from http: //developer.netscape.com/docs/examples/javascript/browser_type.html.

When included within an HTML document and evaluated on the client Web browser, the Client Sniffer creates an is object with a series of properties that can be used in your scripts to detect the browser type and platform being used to view your document. Figure 27.1 shows Netscape Navigator version 4.05, running on Windows 95, viewing the Web site at the URL given in the previous paragraph.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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