Table of contents
- 1. Summary
- 2. Example
- 3. Properties
- 4. Methods
- 5. See also
- 6. Specification
Summary
Returns a reference to the navigator object, which can be queried for information about the application running the script.
Example
alert("You're using " + navigator.appName);
Properties
navigator.appCodeNameNon-standard- Returns the internal "code" name of the current browser. Do not rely on this property to return the correct value.
navigator.appName- Returns the official name of the browser. Do not rely on this property to return the correct value.
navigator.appVersion- Returns the version of the browser as a string. Do not rely on this property to return the correct value.
navigator.buildIDNon-standard- Returns the build identifier of the browser (e.g. "2006090803")
navigator.connection- Provides information about the network connection of a device.
navigator.cookieEnabled- Returns a boolean indicating whether cookies are enabled in the browser or not.
navigator.doNotTrackNon-standard- Reports the value of the user's do-not-track preference. When this value is "yes", your web site or application should not track the user.
navigator.idNon-standard- Returns the
idobject which you can use to add support for BrowserID to your web site. navigator.language- Returns a string representing the language version of the browser.
navigator.mimeTypes- Returns a list of the MIME types supported by the browser.
navigator.mozAppsNon-standard- Returns an
Appsobject you can use to install, manage, and control Open Web apps. navigator.mozBatteryRequires Gecko 10.0 Non-standard- Returns a
batteryobject you can use to get information about the battery charging status. navigator.mozNotificationMobile Only in Gecko 2.0 Non-standard
navigator.webkitNotification- Returns a
notificationobject you can use to deliver notifications to the user from your web application. navigator.mozSmsMobile Only in Gecko Requires Gecko 12.0 Non-standard- Returns a
SmsManagerobject you can use to manage SMS messaging in your web application. navigator.mozTelephonyMobile Only in Gecko Non-standard- Returns a
Telephonyobject you can use to create and manage telephone calls. navigator.onLine- Returns a boolean indicating whether the browser is working online.
navigator.oscpu- Returns a string that represents the current operating system.
navigator.platform- Returns a string representing the platform of the browser.
navigator.plugins- Returns an array of the plugins installed in the browser.
navigator.productNon-standard- Returns the product name of the current browser. (e.g. "Gecko")
navigator.productSubNon-standard- Returns the build number of the current browser (e.g. "20060909")
navigator.securitypolicyNon-standard- Returns an empty string. In Netscape 4.7x, returns "US & CA domestic policy" or "Export policy".
navigator.userAgent- Returns the user agent string for the current browser.
navigator.vendorNon-standard- Returns the vendor name of the current browser (e.g. "Netscape6")
navigator.vendorSubNon-standard- Returns the vendor version number (e.g. "6.1")
navigator.webkitPointerNon-standard- Returns a PointerLock object for the Mouse Lock API.
Methods
navigator.javaEnabled- Indicates whether the host browser is Java-enabled or not.
navigator.mozIsLocallyAvailableNon-standard- Lets code check to see if the document at a given URI is available without using the network.
navigator.preferenceObsolete since Gecko 2.0 Non-standard- Sets a user preference. This method is only available to privileged code and is obsolete; you should use the XPCOM Preferences API instead.
navigator.registerContentHandler- Allows web sites to register themselves as a possible handler for a given MIME type.
navigator.registerProtocolHandler- Allows web sites to register themselves as a possible handler for a given protocol.
navigator.taintEnabledDeprecated since Gecko 1.7.8 Obsolete since Gecko 9.0 Non-standard- Returns
false. JavaScript taint/untaint functions removed in JavaScript 1.2. navigator.vibrate()Requires Gecko 11.0- Causes vibration on devices with support for it. Does nothing if vibration support isn't available.
Specification
- Defined in HTML.


Mozilla Developer Network