Name

Navigator — information about the browser in use

Availability

Client-side JavaScript 1.0; enhanced in JavaScript 1.1 and 1.2

Synopsis

navigator

Properties

navigator.appCodeName

The code name of the browser.

navigator.appName

The application name of the browser.

navigator.appVersion

The platform and version of the browser.

navigator.language

The default language of the browser. Navigator 4.

navigator.mimeTypes[]

An array of supported MIME types. JavaScript 1.1; empty in Internet Explorer 4.

navigator.platform

The operating system the browser is running under. JavaScript 1.2.

navigator.plugins[]

An array of installed plugins. JavaScript 1.1; empty in Internet Explorer 4.

navigator.systemLanguage

The default language of the underlying system. Internet Explorer 4.

navigator.userAgent

The HTTP user-agent value.

navigator.userLanguage

The language of the current user. Internet Explorer 4.

Functions

navigator.javaEnabled()

Test whether Java is available. JavaScript 1.1.

navigator.plugins.refresh()

Make newly installed plugins available. Navigator 3.

navigator.preference(prefname, value)

Set or retrieve user preferences. Navigator 4; requires UniversalPreferencesRead privilege to query preferences; requires UniversalPreferencesWrite privilege to set preference values.

navigator.savePreferences()

Save the user’s preferences. Navigator 4; requires UniversalPreferencesWrite privilege.

navigator.taintEnabled()

Test whether data tainting is enabled. JavaScript 1.1; deprecated.

Get Webmaster in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.