start page | rating of books | rating of authors | reviews | copyrights

JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

Navigator Object

Name

Navigator Object---information about the browser in use

Availability

Navigator 2.0, Internet Explorer 3.0; enhanced in Navigator 3.0

Synopsis

navigator

Properties

appCodeName

The code name of the browser.

appName

The name of the browser.

appVersion

Version information for the browser.

mimeTypes[]

An array of MimeType objects describing the MIME types recognized and supported by the browser. Added in Navigator 3.0.

mimeTypes.length

The number of elements in the mimeTypes[] array.

plugins[]

An array of Plugin objects describing the installed plug-ins. Added in Navigator 3.0.

plugins.length

The number of elements in the plugins[] array.

userAgent

The string passed by the browser as the user-agent header in HTTP requests.

Methods

javaEnabled()

Test whether Java is supported and enabled in the current browser. Added in Navigator 3.0.

plugins.refresh()

Check for newly installed plug-ins, enter them in the plugins[] array, and optionally reload documents using those plug-ins. Added in Navigator 3.0.

taintEnabled()

Test whether the data-tainting security model is supported and enabled in the current browser. Added in Navigator 3.0.

Description

The Navigator object contains properties that describe the web browser in use. You can use its properties to perform platform-specific customization. The name of this object obviously refers to the Netscape Navigator browser, but other browsers that implement JavaScript will support this object as well.

There is only a single instance of the Navigator object, which you can reference through the navigator property of any Window object. Because of the implicit window reference, you can always refer to the Navigator object simply as navigator.

See Also

"MimeType", "Plugin"


Previous Home Next
navigator Book Index Navigator.appCodeName

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell