• 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 turning to Cross-Browser Dynamic HTML (which, for the sake of brevity, is abbreviated 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 for 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 Microsoft Internet Explorer 5.5 viewing the Web site with the sniffer; Netscape Navigator 4.73 is shown in Figure 27.2. The information found includes the following:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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