window.navigator

Table of contents

  1. 1. Summary
  2. 2. Example
  3. 3. Properties
  4. 4. Methods
  5. 5. See also
  6. 6. Specification
Table of contents
  1. 1. Summary
  2. 2. Example
  3. 3. Properties
  4. 4. Methods
  5. 5. See also
  6. 6. Specification

« Gecko DOM Reference

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.appCodeName Non-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.buildID Non-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.doNotTrack Non-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.id Non-standard
Returns the id object 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.mozApps Non-standard
Returns an Apps object you can use to install, manage, and control Open Web apps.
navigator.mozBattery Requires Gecko 10.0 Non-standard
Returns a battery object you can use to get information about the battery charging status.
navigator.mozNotification Mobile Only in Gecko 2.0 Non-standard
navigator.webkitNotification
Returns a notification object you can use to deliver notifications to the user from your web application.
navigator.mozSms Mobile Only in Gecko Requires Gecko 12.0 Non-standard
Returns a SmsManager object you can use to manage SMS messaging in your web application.
navigator.mozTelephony Mobile Only in Gecko Non-standard
Returns a Telephony object 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.product Non-standard
Returns the product name of the current browser. (e.g. "Gecko")
navigator.productSub Non-standard
Returns the build number of the current browser (e.g. "20060909")
navigator.securitypolicy Non-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.vendor Non-standard
Returns the vendor name of the current browser (e.g. "Netscape6")
navigator.vendorSub Non-standard
Returns the vendor version number (e.g. "6.1")
navigator.webkitPointer Non-standard
Returns a PointerLock object for the Mouse Lock API.

Methods

navigator.javaEnabled
Indicates whether the host browser is Java-enabled or not.
navigator.mozIsLocallyAvailable Non-standard
Lets code check to see if the document at a given URI is available without using the network.
navigator.preference Obsolete 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.taintEnabled Deprecated 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

Tags (6)

Edit tags

Attachments (0)

 

Attach file