Navigator

Originally published on June 14, 2016.
Last updated on June 28, 2016.

Contents


<script>// <![CDATA[
document.writeln(navigator + "<br />");
for (x in navigator) {
    document.writeln("[" + (typeof navigator[x]) + "] <b>" + x + " :</b> " + navigator[x] + "<br />");
}
// ]]></script>


Navigator

[object Navigator]

Samsung Galaxy S3 Safari 4.0 (Default Browser)
start
object geolocation : [object Geolocation]
object connection : [object Connection]
boolean onLine : true
boolean cookieEnabled : true
string vendorSub : 
string vendor : Google Inc.
string productSub : 20030107
string product : Gecko
object mimeTypes : [object DOMMimeTypeArray]
object plugins : [object DOMPluginArray]
string platform : Linux armv7l
string userAgent : Mozilla/5.0 (Linux; U; Android 4.4.2; en-us; SCH-I535 Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
string language : en-US
string appVersion : 5.0 (Linux; U; Android 4.4.2; en-us; SCH-I535 Build/KOT49H) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
string appName : Netscape
string appCodeName : Mozilla
function javaEnabled : function javaEnabled() { [native code] }
function isApplicationInstalled : function isApplicationInstalled() { [native code] }
function getStorageUpdates : function getStorageUpdates() { [native code] }
end

 


 


Interfaces

Coordinates

(5.4 Coordinates interface in _____)

[NoInterfaceObject]
interface Coordinates {
    readonly attribute double latitude;
    readonly attribute double longitude;
    readonly attribute double altitude;
    readonly attribute double accuracy;
    readonly attribute double altitudeAccuracy;
    readonly attribute double heading;
    readonly attribute double speed;
};

The Coordinates interface is described in section 5.4 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

DOMString

(_____ in _____)


The DOMString interface is described in section _____ of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

DOMTimeStamp

(_____ in _____)


The DOMTimeStamp interface is described in section _____ of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

Geolocation

(5.1 Geolocation interface in _____)

[NoInterfaceObject]
interface Geolocation {
    void getCurrentPosition(PositionCallback successCallback,
                            optional PositionErrorCallback errorCallback,
                            optional PositionOptions options);

    long watchPosition     (PositionCallback successCallback,
                            optional PositionErrorCallback errorCallback,
                            optional PositionOptions options);

    void clearWatch        (long watchId);
};

callback PositionCallback = void (Position position);

callback PositionErrorCallback = void (PositionError positionError);

The Geolocation interface is described in section 5.1 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

MediaDevices

(_____ in _____)


The MediaDevices interface is described in section _____ of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

MimeType

(6.6.1.5 Plugins in HTML 5)

interface MimeType {
    readonly attribute DOMString type;
    readonly attribute DOMString description;
    readonly attribute DOMString suffixes; // comma-separated
    readonly attribute Plugin    enabledPlugin;
};

The MimeType interface is described in section 6.6.1.5 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

MimeTypeArray

(6.6.1.5 Plugins in HTML 5)

interface MimeTypeArray {
  readonly attribute unsigned long length;

  getter MimeType item     (unsigned long index);
  getter MimeType namedItem(DOMString name);
};

The MimeTypeArray interface is described in section 6.6.1.5 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

Navigator

(6.6.1 The Navigator Object in HTML 5)

interface Navigator {
    // objects implementing this interface also implement the interfaces given below
};
Navigator implements NavigatorID;
Navigator implements NavigatorLanguage;
Navigator implements NavigatorOnLine;
Navigator implements NavigatorContentUtils;
Navigator implements NavigatorStorageUtils;
Navigator implements NavigatorPlugins;

The Navigator interface is described in section 6.6.1 of HTML 5.

(5.1 Geolocation interface in _____)

partial interface Navigator {
    readonly attribute Geolocation geolocation;
};

The Navigator partial interface is described in section 5.1 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

NavigatorContentUtils

(6.6.1.3 Custom Scheme and Content Handlers in HTML 5)

[NoInterfaceObject]
interface NavigatorContentUtils {
    // content handler registration
    void registerprotocolhandler  (DOMString scheme,
                                   DOMString url,
                                   DOMString title);
    void registerContentHandler   (DOMString mimeType,
                                   DOMString url,
                                   DOMString title);
    void unregisterProtocolHandler(DOMString scheme,
                                   DOMString url);
    void unregisterContentHandler (DOMString mimeType,
                                   DOMString url);
};

The NavigatorStorageUtils interface is described in section 6.6.1.3 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

NavigatorGeolocation

(5.1 Geolocation interface in _____)

[NoInterfaceObject]
interface NavigatorGeolocation {
    readonly attribute Geolocation geolocation;
};

Navigator implements NavigatorGeolocation;

The NavigatorGeolocation interface is described in section 5.1 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

NavigatorID

(6.6.1.1 Client identification in HTML 5)

[NoInterfaceObject]
interface NavigatorID {
    readonly attribute DOMString appCodeName; // constant "Mozilla"
    readonly attribute DOMString appName;
    readonly attribute DOMString appVersion;
    readonly attribute DOMString platform;
    readonly attribute DOMString product; // constant "Gecko"
    readonly attribute DOMString userAgent;

    boolean taintEnabled(); // constant false
};

The NavigatorID interface is described in section 6.6.1.1 of HTML 5.

Implemented by the Navigator interface.

NavigatorLanguage

(6.6.1.2 Language Preferences in HTML 5)

[NoInterfaceObject]
interface NavigatorLanguage {
    readonly attribute DOMString language;
};

The NavigatorLanguage interface is described in section 6.6.1.2 of HTML 5.

Defined in the NavigatorLanguage interface.

Defined in _____.

Tested on _____.

Undefined in _____.

NavigatorOnLine

(5.7.10 Browser state in HTML 5)

[NoInterfaceObject]
interface NavigatorOnLine {
    readonly attribute boolean onLine;
};

The NavigatorOnLine interface is described in section 5.7.10 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

NavigatorPlugins

(6.6.1.5 Plugins in HTML 5)

[NoInterfaceObject]
interface NavigatorPlugins {
    readonly attribute PluginArray   plugins;
    readonly attribute MimeTypeArray mimeTypes;
    readonly attribute boolean       javaEnabled;
};

The NavigatorPlugins interface is described in section 6.6.1.5 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

NavigatorStorageUtils

(6.6.1.4 Manually Releasing the Storage Mutex in HTML 5)

[NoInterfaceObject]
interface NavigatorStorageUtils {
    readonly attribute boolean cookieEnabled;

    void yieldForStorageUpdates();
};

The NavigatorStorageUtils interface is described in section 6.6.1.4 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

Plugin

(6.6.1.5 Plugins in HTML 5)

interface Plugin {
    readonly attribute DOMString     name;
    readonly attribute DOMString     description;
    readonly attribute DOMString     filename;
    readonly attribute unsigned long length;

    getter MimeType item     (unsigned long index);
    getter MimeType namedItem(DOMString name);
};

The Plugin interface is described in section 6.6.1.5 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

PluginArray

(6.6.1.5 Plugins in HTML 5)

interface PluginArray {
    readonly attribute unsigned long length;

    void refresh           (optional boolean reload = false);
    getter Plugin item     (unsigned long index);
    getter Plugin namedItem(DOMString name);
};

The PluginArray interface is described in section 6.6.1.5 of HTML 5.

Defined in _____.

Tested on _____.

Undefined in _____.

Position

(5.3 Position interface in _____)

[NoInterfaceObject]
interface Position {
    readonly attribute Coordinates  coords;
    readonly attribute DOMTimeStamp timestamp;
};

The Position interface is described in section 5.3 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

PositionError

(5.5 PositionError interface in _____)

[NoInterfaceObject]
interface PositionError {
    const unsigned short              PERMISSION_DENIED = 1;
    const unsigned short              POSITION_UNAVAILABLE = 2;
    const unsigned short              TIMEOUT = 3;
    readonly attribute unsigned short code;
    readonly attribute DOMString      message;
};

The PositionError interface is described in section 5.5 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

PositionOptions

(5.2 PositionOptions interface in _____)

[NoInterfaceObject]
interface PositionOptions {
    attribute boolean enableHighAccuracy;
    attribute long    timeout;
    attribute long    maximumAge;
};

The PositionOptions interface is described in section 5.2 of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

_____

(_____ in _____)


The _____ interface is described in section _____ of _____.

Defined in _____.

Tested on _____.

Undefined in _____.

Attributes

navigator.appCodeName

Property Type Value
appCodeName String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["appCodeName"]) +
                 "] <b>appCodeName:</b> " +
                 navigator["appCodeName"]);
// ]]></script>

Read only. Must return the string “Mozilla”.

Defined in the NavigatorID interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.appMinorVersion

Property Type Value
appMinorVersion String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["appMinorVersion"]) +
                 "] <b>appMinorVersion:</b> " +
                 navigator["appMinorVersion"]);
// ]]></script>

Defined in _____.

Tested in IE 11.0.

Undefined in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android.

navigator.appName

Property Type Value
appName String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["appName"]) +
                 "] <b>appName:</b> " +
                 navigator["appName"]);
// ]]></script>

Read only. Must return the string “Netscape”.

Defined in the NavigatorID interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.appVersion

Property Type Value
appVersion String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["appVersion"]) +
                 "] <b>appVersion:</b> " +
                 navigator["appVersion"]);
// ]]></script>

Read only. Must return either the string “4.0” or a string representing the version of the browser in detail, e.g. “1.0 (VMS; en-US) Mellblomenator/9000”.

Defined in the NavigatorID interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.browserLanguage

Property Type Value
browserLanguage String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["browserLanguage"]) +
                 "] <b>browserLanguage:</b> " +
                 navigator["browserLanguage"]);
// ]]></script>

Defined in _____.

Tested in IE 11.0.

Undefined in Chrome 51.0 Android, firefox-47-0-android.

navigator.buildID

Property Type Value
buildID
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["buildID"]) +
                 "] <b>buildID:</b> " +
                 navigator["buildID"]);
// ]]></script>

Defined in _____.

Tested in Firefox 47.0, firefox-47-0-android.

Undefined in Chrome 51.0 Android, Edge 13.10586, IE 11.0
.

navigator.cookieEnabled

Property Type Value
cookieEnabled Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["cookieEnabled"]) +
                 "] <b>cookieEnabled:</b> " +
                 navigator["cookieEnabled"]);
// ]]></script>

The cookieEnabled attribute must return true if the user agent attempts to handle cookies according to the cookie specification, and false if it ignores cookie change requests. See RFC 6265: HTTP State Management Mechanism.

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.cpuClass

Property Type Value
cpuClass String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["cpuClass"]) +
                 "] <b>cpuClass:</b> " +
                 navigator["cpuClass"]);
// ]]></script>

Defined in _____.

Tested in IE 11.0.

Undefined in Chrome 51.0 Android, firefox-47-0-android.

navigator.doNotTrack

Property Type Value
doNotTrack String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["doNotTrack"]) +
                 "] <b>doNotTrack:</b> " +
                 navigator["doNotTrack"]);
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Firefox 47.0, firefox-47-0-android.

Undefined in Edge 13.10586, IE 11.0.


6. Do Not Track User Preference
https://www.w3.org/Submission/web-tracking-protection/#do-not-track
Zeigler, Andy, ed. “Web Tracking Protection”. W3C Member Submission. February 24, 2011.
http://www.w3.org/Submission/2011/SUBM-web-tracking-protection-20110224/
“Basic DOM Reference”. Microsoft Developer Network.
https://msdn.microsoft.com/en-us/library/hh771916(v=vs.85).aspx

navigator.hardwareConcurrency

Property Type Value
hardwareConcurrency Number
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["hardwareConcurrency"]) +
                 "] <b>hardwareConcurrency:</b> " +
                 navigator["hardwareConcurrency"]);
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android,.

Undefined in firefox-47-0-android.

navigator.language

Property Type Value
language String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["language"]) +
                 "] <b>language:</b> " +
                 navigator["language"]);
// ]]></script>

Read only. Must return a valid BCP 47 language tag representing either a plausible language or the user’s most preferred language.

<script>// <![CDATA[
var lang = navigator.language;
if (lang == "en") {
    document.writeln("Language is English.");
} else if (lang == "en-US") {
    document.writeln("Language is English (United States).");
} else if ((lang == "nv") || (lang == "nav")) {
    document.writeln("Language is Navajo.");
} else {
    document.writeln("Language is something else.");
}
// ]]></script>

Defined in the NavigatorLanguage interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.languages

Property Type Value
languages FrozenArray
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["languages"]) +
                 "] <b>languages:</b> " +
                 navigator["languages"]);
// ]]></script>

Read only. Must return a frozen array of valid BCP 47 language tags representing either one or more plausible languages, or the user’s preferred languages, ordered by preference with the most preferred language first. (A frozen array type is a parameterized type whose values are references to objects that hold a fixed length array of unmodifiable values.) The same object must be returned until the user agent needs to return different values, or values in a different order.

Whenever the user agent needs to make the navigator.languages attribute of a Window or WorkerGlobalScope object return a new set of language tags, the user agent must queue a task to fire a simple event named languagechange at the Window or WorkerGlobalScope object and wait until that task begins to be executed before actually returning a new value.

The task source for this task is the DOM manipulation task source.

To determine a plausible language, the user agent should bear in mind the following:

  • Any information in this API that varies from user to user can be used to profile or identify the user. (This is a fingerprinting vector.)
  • If the user is not using a service that obfuscates the user’s point of origin (e.g. the Tor anonymity network), then the value that is least likely to distinguish the user from other users with similar origins (e.g. from the same IP address block) is the language used by the majority of such users. [TOR]
  • If the user is using an anonymizing service, then the value “en-US” is suggested; if all users of the service use that same value, that reduces the possibility of distinguishing the users from each other.

To avoid introducing any more fingerprinting vectors, user agents should use the same list for the APIs defined in this function as for the HTTP “Accept-Language” header. (This is a fingerprinting vector.)

Defined in _____.

Tested in Chrome 51.0 Android, Firefox 47.0, firefox-47-0-android.

Undefined in Edge 13.10586, IE 11.0.

navigator.maxTouchPoints

Property Type Value
maxTouchPoints Number
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["maxTouchPoints"]) +
                 "] <b>maxTouchPoints:</b> " +
                 navigator["maxTouchPoints"]);
// ]]></script>

Read only. The maximum number of simultaneous touch contacts supported by the device.

partial interface Navigator {
    readonly attribute long maxTouchPoints;
};


Defined in Pointer Events. The Navigator interface is defined in HTML 5. This specification extends the Navigator interface to provide device and feature detection support.

The maximum number of simultaneous touch contacts supported by the device. In the case of devices with multiple digitizers (e.g. multiple touchscreens), the value must be the maximum of the set of maximum supported contacts by each individual digitizer.

For example, suppose a device has 3 touchscreens, which support 2, 5, and 10 simultaneous touch contacts, respectively. The value of maxTouchPoints should be 10.

While a maxTouchPoints value of greater than 0 indicates the user’s device is capable of supporting touch input, it does not necessarily mean the user will use touch input. Authors should be careful to also consider other input modalities that could be present on the system, such as mouse, pen, screen readers, etc.

maxTouchPoints is often used to ensure that the interaction model of the content can be recognized by the current hardware. UI affordances can be provided to users with less capable hardware. On platforms where the precise number of touch points is not known, the minimum number guaranteed to be recognized is provided. Therefore, it is possible for the number of recognized touch points to exceed the value of maxTouchPoints.

In Internet Explorer 10 on Windows 7, this property always returns a value of zero, regardless of the capabilities of the device.

This example gets the number of touch points on a device. In Internet Explorer 10, it returns a zero on a mouse only computer, or 1 or more on a touch enabled computer and Windows 8. On earlier versions of Windows, maxTouchPoints returns undefined.

<!DOCTYPE html>
<html>
<head>
    <title>Touch points test</title>
</head>
<body>
    <div id="showme"></div>
    <script>
    var touchpoints = navigator.maxTouchPoints;
    if (touchpoints) {
        document.getElementById("showme").innerHTML = touchpoints.toString();
    } else {
        document.getElementById("showme").innerHTML = "undefined";
    }
    </script>
</body>
</html>

Pointer Events, Internet Explorer 10+.

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, IE 11.0
.

Undefined in Firefox 47.0, firefox-47-0-android.

navigator.msManipulationViewsEnabled

Property Type Value
msManipulationViewsEnabled Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["msManipulationViewsEnabled"]) +
                 "] <b>msManipulationViewsEnabled:</b> " +
                 navigator["msManipulationViewsEnabled"]);
// ]]></script>

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in Chrome 51.0 Android, Firefox 47.0, firefox-47-0-android.

navigator.msMaxTouchPoints

Property Type Value
msMaxTouchPoints Number
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["msMaxTouchPoints"]) +
                 "] <b>msMaxTouchPoints:</b> " +
                 navigator["msMaxTouchPoints"]);
// ]]></script>

Defined in _____.

Tested in IE 11.0.

Undefined in Chrome 51.0 Android, firefox-47-0-android.

navigator.msPointerEnabled

Property Type Value
msPointerEnabled Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["msPointerEnabled"]) +
                 "] <b>msPointerEnabled:</b> " +
                 navigator["msPointerEnabled"]);
// ]]></script>

Defined in _____.

Tested in IE 11.0.

Undefined in Chrome 51.0 Android, firefox-47-0-android.

navigator.onLine

Property Type Value
onLine Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["onLine"]) +
                 "] <b>onLine:</b> " +
                 navigator["onLine"]);
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.oscpu

Property Type Value
oscpu String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["oscpu"]) +
                 "] <b>oscpu:</b> " +
                 navigator["oscpu"]);
// ]]></script>

Read only. If the navigator compatibility mode is Gecko, then the user agent must also support the partial interface NavigatorID. The oscpu attribute’s getter must return either the empty string or a string representing the platform on which the browser is executing, e.g. “Windows NT 10.0; Win64; x64”, “Linux x86_64”.

Defined in _____.

Tested in Firefox 47.0, firefox-47-0-android, firefox-47-0-android.

Undefined in Chrome 51.0 Android, Edge 13.10586, IE 11.0.

navigator.platform

Property Type Value
platform String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["platform"]) +
                 "] <b>platform:</b> " +
                 navigator["platform"]);
// ]]></script>

Read only. Must return either the empty string or a string representing the platform on which the browser is executing, e.g. “MacIntel”, “Win32”, “FreeBSD i386”, “WebTV OS”.

Defined in the NavigatorID interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.pointerEnabled

Property Type Value
pointerEnabled Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["pointerEnabled"]) +
                 "] <b>pointerEnabled:</b> " +
                 navigator["pointerEnabled"]);
// ]]></script>

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in Chrome 51.0 Android, Firefox 47.0, firefox-47-0-android.

navigator.product

Property Type Value
product String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["product"]) +
                 "] <b>product:</b> " +
                 navigator["product"]);
// ]]></script>

Read only. Must return the string “Gecko”.

Defined in the NavigatorID interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.productSub

Property Type Value
productSub String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["productSub"]) +
                 "] <b>productSub:</b> " +
                 navigator["productSub"]);
// ]]></script>

Read only. Must return the appropriate string from the following list:
If the navigator compatibility mode is Chrome or WebKit, the string “20030107”.
If the navigator compatibility mode is Gecko, the string “20100101”.

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android.

Undefined in IE 11.0.

navigator.systemLanguage

Property Type Value
systemLanguage String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["systemLanguage"]) +
                 "] <b>systemLanguage:</b> " +
                 navigator["systemLanguage"]);
// ]]></script>

Defined in _____.

Tested in IE 11.0.

Undefined in Chrome 51.0 Android, firefox-47-0-android.

navigator.userAgent

Property Type Value
userAgent String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["userAgent"]) +
                 "] <b>userAgent:</b> " +
                 navigator["userAgent"]);
// ]]></script>

Read only. Must return the default “User-Agent” value.

Internet Explorer 11.420.10586.0 gives the following userAgent string:

5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; InfoPath.3; rv:11.0) like Gecko

See the article “Understanding User-Agent Strings” on Microsoft Developer Network’s website.

Defined in the NavigatorID interface.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.vendor

Property Type Value
vendor String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["vendor"]) +
                 "] <b>vendor:</b> " +
                 navigator["vendor"]);
// ]]></script>

Read only. Must return the appropriate string from the following list:
If the navigator compatibility mode is Chrome, the string “Google Inc.”.
If the navigator compatibility mode is Gecko, the empty string.
If the navigator compatibility mode is WebKit, the string “Apple Computer, Inc.”.

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android, IE 11.0.

Undefined in _____.

navigator.vendorSub

Property Type Value
vendorSub String
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["vendorSub"]) +
                 "] <b>vendorSub:</b> " +
                 navigator["vendorSub"]);
// ]]></script>

Read only. Must return the empty string.

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, firefox-47-0-android.

Undefined in IE 11.0.

navigator.webdriver

Property Type Value
webdriver Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["webdriver"]) +
                 "] <b>webdriver:</b> " +
                 navigator["webdriver"]);
// ]]></script>

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in Chrome 51.0 Android, Firefox 47.0, firefox-47-0-android.

Methods

navigator.confirmSiteSpecificTrackingException()

Method Returns Value
confirmSiteSpecificTrackingException() Boolean
<script>// <![CDATA[
document.writeln("[" + (typeof navigator["confirmsitespecifictrackingexception"]) +
                 "] <b>confirmsitespecifictrackingexception:</b> " +
                 navigator["confirmsitespecifictrackingexception"]);
// ]]></script>

Indicates whether an exception exists for a given domain.

var retVal = navigator.confirmSiteSpecificTrackingException(args);

Parameters

args [in]

Type: object

An object literal containing the following attribute:

domain
Cookie-like string that identifies the domain that the exception belongs to.

Return value

Type: boolean

Returns true when the user has previously granted an exception for the site identified in the domain attribute of the args object literal, false otherwise.

Remarks

Because users can clear (or revoke) previously granted exceptions, sites should confirm exceptions before relying on them.

Note This method is not supported for Windows Store apps.

Internet Explorer 11.

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.confirmWebWideTrackingException()

Method Returns Value
confirmWebWideTrackingException()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.getBattery()

Method Returns Value
getBattery() object Promise

Defined in _____.

Tested in Chrome 51.0 Android, Firefox 47.0.

Undefined in Edge 13.10586.

navigator.getGamepads()

Method Returns Value
getGamepads()

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0.

Undefined in _____.

navigator.getUserMedia()

Method Returns Value
getUserMedia()

Defined in _____.

Tested in Edge 13.10586.

Undefined in _____.

navigator.javaEnabled()

Method Returns Value
javaEnabled()

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, IE 11.0.

Undefined in _____.

navigator.mozGetUserMedia()

Method Returns Value
mozGetUserMedia()

Defined in _____.

Tested in Firefox 47.0.

Undefined in _____.

navigator.msLaunchUri()

Method Returns Value
msLaunchUri()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.msSaveBlob()

Method Returns Value
msSaveBlob()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.msSaveOrOpenBlob()

Method Returns Value
msSaveOrOpenBlob()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.registerContentHandler()

Method Returns Value
registerContentHandler()

window.navigator.registerContentHandler(mimeType, url, title)

The registerContentHandler() method allows Web sites to register themselves as possible handlers for content in a particular MIME type. For example, an online telephone messaging service could register itself as a handler for text/vcard files, so that if the user has no native application capable of handling vCards, their Web browser can instead suggest they use that site to view contact information stored on vCards that they open. [SMS] [RFC6350]

Throws a SecurityError exception if the user agent blocks the registration (this might happen if trying to register as a handler for “http”, for instance).

Throws a SyntaxError exception if the “%s” string is missing in the URL.

Defined in _____.

Tested in Firefox 47.0.

Undefined in _____.

navigator.registerProtocolHandler()

Method Returns Value
registerProtocolHandler()

window.navigator.registerProtocolHandler(scheme, url, title)

The registerProtocolHandler() method allows Web sites to register themselves as possible handlers for particular schemes. For example, an online telephone messaging service could register itself as a handler of the sms: scheme, so that if the user clicks on such a link, they are given the opportunity to use that Web site.

Throws a SecurityError exception if the user agent blocks the registration (this might happen if trying to register as a handler for “http”, for instance).

Throws a SyntaxError exception if the “%s” string is missing in the URL.

Defined in _____.

Tested in Firefox 47.0.

Undefined in _____.

navigator.removeSiteSpecificTrackingException()

Method Returns Value
removeSiteSpecificTrackingException()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.removeWebWideTrackingException()

Method Returns Value
removeWebWideTrackingException()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.requestMediaKeySystemAccess()

Method Returns Value
requestMediaKeySystemAccess() object Promise

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0.

Undefined in _____.

navigator.requestMIDIAccess()

Method Returns Value
requestMIDIAccess()

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

navigator.sendBeacon()

Method Returns Value
sendBeacon()

Defined in _____.

Tested in Chrome 51.0 Android, Firefox 47.0.

Undefined in _____.

navigator.storeSiteSpecificTrackingException()

Method Returns Value
storeSiteSpecificTrackingException()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.storeWebWideTrackingException()

Method Returns Value
storeWebWideTrackingException()

Defined in _____.

Tested in Edge 13.10586, IE 11.0.

Undefined in _____.

navigator.taintEnabled()

Method Returns Value
taintEnabled() Boolean

Returns a Boolean. If the navigator compatibility mode is Gecko, then the user agent must also support the partial interface NavigatorID. The taintEnabled() method must return false.

Defined in the NavigatorID interface.

Tested in Firefox 47.0, IE 11.0.

Undefined in _____.

navigator.unregisterContentHandler()

Method Returns Value
unregisterContentHandler() void

void unregisterContentHandler(DOMString mimeType, DOMString url);

Defined in _____.

Tested in _____.

Undefined in _____.

navigator.unregisterProtocolHandler()

Method Returns Value
unregisterProtocolHandler() void

void unregisterProtocolHandler(DOMString scheme, DOMString url);

Defined in _____.

Tested in _____.

Undefined in _____.

navigator.vibrate()

Method Returns Value
vibrate() Boolean

boolean vibrate(VibratePattern pattern);

typedef (unsigned long or sequence) VibratePattern;

partial interface Navigator {
    boolean vibrate(VibratePattern pattern);
};

Defined in _____. Vibration API. W3C Editor’s Draft. June 14, 2016. https://w3c.github.io/vibration/

Tested in Chrome 51.0 Android, Firefox 47.0.

Undefined in _____.

navigator.webkitGetUserMedia()

Method Returns Value
webkitGetUserMedia()

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

navigator.yieldForStorageUpdates()

Method Returns Value
yieldForStorageUpdates() void

void yieldForStorageUpdates();

Defined in _____.

Tested in _____.

Undefined in _____.

Events

Objects

navigator.battery

<script>// <![CDATA[
document.writeln(navigator.battery + "<br />");
for (x in navigator.battery) {
    document.writeln("<b>" + x + " :</b> " + navigator.battery[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Firefox 47.0.

Undefined in Chrome 51.0 Android, Edge 13.10586, IE 11.0.

navigator.connection

object connection: [object NetworkInformation]

<script>// <![CDATA[ 
document.writeln(navigator.connection + "<br />");
for (x in navigator.connection) {
    document.writeln("<b>" + x + " :</b> " + navigator.connection[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

navigator.credentials

object credentials: [object CredentialsContainer]

<script>// <![CDATA[ 
document.writeln(navigator.credentials + "<br />");
for (x in navigator.credentials) {
    document.writeln("<b>" + x + " :</b> " + navigator.credentials[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

navigator.geolocation

<script>// <![CDATA[ 
document.writeln(navigator.geolocation + "<br />");
for (x in navigator.geolocation) {
    document.writeln("<b>" + x + " :</b> " + navigator.geolocation[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, IE 11.0.

Undefined in _____.

navigator.mediaDevices

<script>// <![CDATA[
document.writeln(navigator.mediaDevices + "<br />");
for (x in navigator.mediaDevices) {
    document.writeln("<b>" + x + " :</b> " + navigator.mediaDevices[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0.

Undefined in IE 11.0.

navigator.mimeTypes

mimeTypes: [object MimeTypeArray]

<script>// <![CDATA[
document.writeln(navigator.mimeTypes + "<br />");
for (x in navigator.mimeTypes) {
    document.writeln("<b>" + x + " :</b> " + navigator.mimeTypes[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, IE 11.0.

Undefined in _____.

navigator.mozContacts

mozContacts: [object ContactManager]

<script>// <![CDATA[
document.writeln(navigator.mozContacts + "<br />");
for (x in navigator.mozContacts) {
    document.writeln("<b>" + x + " :</b> " + navigator.mozContacts[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Firefox 47.0.

Undefined in Chrome 51.0 Android, Edge 13.10586, IE 11.0.

navigator.permissions

permissions: [object Permissions]

<script>// <![CDATA[
document.writeln(navigator.permissions + "<br />");
for (x in navigator.permissions) {
    document.writeln("<b>" + x + " :</b> " + navigator.permissions[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Firefox 47.0.

Undefined in Edge 13.10586, IE 11.0.

navigator.plugins

plugins: [object PluginArray]

<script>// <![CDATA[
document.writeln(navigator.plugins + "<br />");
for (x in navigator.plugins) {
    document.writeln("<b>" + x + " :</b> " + navigator.plugins[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Edge 13.10586, Firefox 47.0, IE 11.0.

Undefined in _____.

navigator.presentation

object presentation: [object Presentation]

<script>// <![CDATA[ 
document.writeln(navigator.presentation + "<br />");
for (x in navigator.presentation) {
    document.writeln("<b>" + x + " :</b> " + navigator.presentation[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

navigator.serviceWorker

serviceWorker: [object ServiceWorkerContainer]

<script>// <![CDATA[
document.writeln(navigator.serviceWorker + "<br />");
for (x in navigator.serviceWorker) {
    document.writeln("<b>" + x + " :</b> " + navigator.serviceWorker[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android, Firefox 47.0.

Undefined in Edge 13.10586, IE 11.0.

navigator.webkitPersistentStorage

object webkitPersistentStorage: [object DeprecatedStorageQuota]

<script>// <![CDATA[ 
document.writeln(navigator.webkitPersistentStorage + "<br />");
for (x in navigator.webkitPersistentStorage) {
    document.writeln("<b>" + x + " :</b> " + navigator.webkitPersistentStorage[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

navigator.webkitTemporaryStorage

object webkitTemporaryStorage: [object DeprecatedStorageQuota]

<script>// <![CDATA[ 
document.writeln(navigator.webkitTemporaryStorage + "<br />");
for (x in navigator.webkitTemporaryStorage) {
    document.writeln("<b>" + x + " :</b> " + navigator.webkitTemporaryStorage[x] + "<br />");
}
// ]]></script>

Defined in _____.

Tested in Chrome 51.0 Android.

Undefined in _____.

Constants

References

BCP 47 Phillips, A., Ed. “BCP 47: Tags for Identifying Languages”. RFC 5646. Best Current Practice. Internet Engineering Task Force (IETF). September 2009.

Geolocation API Popescu, Andrei. “Geolocation API Specification”. W3C Recommendation. World Wide Web Consortium (W3C). October 24, 2013.

HTML 5 Hickson, Ian. “HTML5: A vocabulary and associated APIs for HTML and XHTML”. W3C Recommendation. World Wide Web Consortium (W3C). October 28, 2014.

Pointer Events Rossi, Jacob. “Pointer Events”. W3C Recommendation. World Wide Web Consortium (W3C). February 24, 2015.

RFC 6265 Barth, A. “RFC 6265: HTTP State Management Mechanism”. Internet Engineering Task Force (IETF). April 2011. [Cookies.]


User Agents (Browsers)

Chrome 51.0 Android User agent: “Mozilla/5.0 (Linux; Android 4.4.2; SCH-I535 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36”.

Edge 13.10586 User agent: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586”.

Firefox 47.0 User agent: “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0”.

Firefox 47.0 Android User agent: “Mozilla/5.0 (Android 4.4.2; Mobile; rv:47.0) Gecko/47.0 Firefox/47.0”.

IE 11.0 Internet Explorer 11.0. User agent: “5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; InfoPath.3; rv:11.0) like Gecko”.

SeaMonkey 2.40 User agent: “Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40”.


Leave a Reply