DOM:window.navigator
From MDC
Contents |
[edit] Summary
Returns a reference to the navigator object, which can be queried for information about the application running the script.
[edit] Example
alert("You're using " + navigator.appName);
[edit] Properties
- navigator.appCodeName
- Returns the internal "code" name of the current browser.
- navigator.appName
- Returns the official name of the browser.
- navigator.appVersion
- Returns the version of the browser as a string.
- navigator.buildID
- Returns the build identifier of the browser (e.g. "2006090803")
- navigator.cookieEnabled
- Returns a boolean indicating whether cookies are enabled in the browser or not.
- 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.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
- Returns the product name of the current browser. (e.g. "Gecko")
- navigator.productSub
- Returns the build number of the current browser (e.g. "20060909")
- navigator.securityPolicy
- 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
- Returns the vendor name of the current browser (e.g. "Netscape6")
- navigator.vendorSub
- Returns the vendor version number (e.g. "6.1")
[edit] Methods
- navigator.javaEnabled
- Indicates whether the host browser is Java-enabled or not.
- navigator.mozIsLocallyAvailable
- Lets code check to see if the document at a given URI is available without using the network.
- navigator.preference
- Sets a user preference. This method is only available to privileged code, and you should use XPCOM Preferences API instead.
- navigator.registerContentHandler
- Allows web sites to register themselves as a possible handler for a given MIME type.
- navigator.registerProtocolHandler New in Firefox 3
- Allows web sites to register themselves as a possible handler for a given protocol.
- navigator.taintEnabled Obsolete
- Returns false. JavaScript taint/untaint functions removed in JavaScript 1.2[1]
[edit] See also
DOM Client Object Cross-Reference:navigator
[edit] Specification
DOM Level 0. Not part of any standard.