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

Chapter 16. Controlling the Browser: The... > Determining the User's Browser Infor...

Determining the User's Browser Information

By far the most common use of the Navigator object is to interrogate the user's browser to determine crucial information such as the name of the browser, its version number, and its operating system. These bits of data enable you to add some "intelligence"to your scripts that gives them the capability to avoid using certain statements, objects, properties, or methods that would otherwise cause an error (or even a crash). Also, knowing the specific browser the user is running enables you to bypass certain HTML tags that aren't supported by the browser, or to use browser-specific features (such as custom style sheets).

Determining the Browser Name

The most basic browser information is the name of the browser but, as you'll see in this section, getting the name isn't necessarily a straightforward operation.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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