NavigatorUAData

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Note: This feature is available in Web Workers.

The NavigatorUAData interface of the User-Agent Client Hints API returns information about the browser and operating system of a user.

An instance of this object is returned by calling Navigator.userAgentData or WorkerNavigator.userAgentData. Therefore, this interface has no constructor.

Note: The terms high entropy and low entropy refer to the amount of information these values reveal about the browser. The values returned as properties are deemed low entropy, which are unlikely to identify a user. The NavigatorUAData.getHighEntropyValues() can be used to request additional high entropy values, which could potentially reveal more identifying information. These values are therefore retrieved via a Promise, allowing time for the browser to request user permission, or make other checks.

Instance properties

Returns an array of brand information containing the browser name and version.

Returns true if the user-agent is running on a mobile device.

Returns the platform brand the user-agent is running on.

Instance methods

Returns a Promise that resolves with a dictionary object containing low entropy information and requested high entropy information about the browser.

A serializer that returns a JSON representation of the low entropy properties of the NavigatorUAData object.

Examples

Getting the brands

The following example prints the value of NavigatorUAData.brands to the console.

js
console.log(navigator.userAgentData.brands);

Returning high entropy values

In the following value a number of hints are requested using the NavigatorUAData.getHighEntropyValues() method. When the promise resolves, this information is printed to the console.

js
navigator.userAgentData
  .getHighEntropyValues([
    "architecture",
    "model",
    "platform",
    "platformVersion",
    "fullVersionList",
  ])
  .then((ua) => {
    console.log(ua);
  });

Specifications

Specification
User-Agent Client Hints
# navigatoruadata

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
NavigatorUAData
Experimental
Chrome – Full support
Chrome 90 (Release date: 2021-04-13)
footnote Full support
Edge – Full support
Edge 90 (Release date: 2021-04-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 76 (Release date: 2021-04-28)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 90 (Release date: 2021-04-13)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 64 (Release date: 2021-05-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote
footnote See bug 40609350
WebView on iOS – No support
WebView on iOS
footnote No support
brands
Experimental
Chrome – Full support
Chrome 90 (Release date: 2021-04-13)
footnote Full support
Edge – Full support
Edge 90 (Release date: 2021-04-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 76 (Release date: 2021-04-28)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 90 (Release date: 2021-04-13)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 64 (Release date: 2021-05-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
getHighEntropyValues
Experimental
Chrome – Full support
Chrome 90 (Release date: 2021-04-13)
footnote
footnote From Chrome 144, whether or not this feature can return high-entropy values can be controlled with the ch-ua-high-entropy-values permissions policy.
Edge – Full support
Edge 90 (Release date: 2021-04-15)
footnote
footnote From Edge 144, whether or not this feature can return high-entropy values can be controlled with the ch-ua-high-entropy-values permissions policy.
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 76 (Release date: 2021-04-28)
footnote
footnote From Opera 128, whether or not this feature can return high-entropy values can be controlled with the ch-ua-high-entropy-values permissions policy.
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 90 (Release date: 2021-04-13)
footnote
footnote From Chrome Android 144, whether or not this feature can return high-entropy values can be controlled with the ch-ua-high-entropy-values permissions policy.
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 64 (Release date: 2021-05-25)
footnote
footnote From Opera Android 95, whether or not this feature can return high-entropy values can be controlled with the ch-ua-high-entropy-values permissions policy.
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
mobile
Experimental
Chrome – Full support
Chrome 90 (Release date: 2021-04-13)
footnote Full support
Edge – Full support
Edge 90 (Release date: 2021-04-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 76 (Release date: 2021-04-28)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 90 (Release date: 2021-04-13)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 64 (Release date: 2021-05-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
platform
Experimental
Chrome – Full support
Chrome 93 (Release date: 2021-08-31)
footnote Full support
Edge – Full support
Edge 93 (Release date: 2021-09-02)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 79 (Release date: 2021-09-14)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 93 (Release date: 2021-08-31)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 66 (Release date: 2021-12-15)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support
toJSON
Experimental
Chrome – Full support
Chrome 93 (Release date: 2021-08-31)
footnote Full support
Edge – Full support
Edge 93 (Release date: 2021-09-02)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 79 (Release date: 2021-09-14)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 93 (Release date: 2021-08-31)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 66 (Release date: 2021-12-15)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.

See also