files/en-us/web/api/navigatoruadata/gethighentropyvalues/index.md
{{APIRef("User-Agent Client Hints API")}}{{SeeCompatTable}}{{AvailableInWorkers}}
The getHighEntropyValues() method of the {{domxref("NavigatorUAData")}} interface returns a {{jsxref("Promise")}} that resolves with a dictionary object containing low entropy information and requested high entropy information about the browser.
The resolved object has the "low entropy" properties available on the NavigatorUAData object included by default — these are the values that are unlikely to enable fingerprinting of the user.
It also contains the subset of "high entropy" values requested in the parameter object, and for which permission has been granted.
These are the values that are more likely to enable fingerprinting.
Note that meaning of the terms low entropy and high entropy is the same as defined in the HTTP User Agent Client Hints mechanism.
[!NOTE] Usage of the
getHighEntropyValues()method to retrieve high-entropy user-agent data can be controlled via the {{HTTPHeader('Permissions-Policy/ch-ua-high-entropy-values', 'ch-ua-high-entropy-values')}} {{HTTPHeader('Permissions-Policy')}}. If the permission is not allowed, the method will only return thebrands,mobile, andplatformlow-entropy data.
getHighEntropyValues(hints)
hints
"architecture""bitness""formFactors""fullVersionList""model""platformVersion""uaFullVersion" {{Deprecated_Inline}}"wow64"A {{jsxref("Promise")}} that resolves to an object containing some or all of the following values (based on the hints requested and granted):
brands
brand and version specifying the browser brand and its version (the same information as provided by {{domxref("NavigatorUAData.brands")}}).
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA")}} header (a low-entropy client hint).mobile
true if the user agent is running on a mobile device (the same information as provided by {{domxref("NavigatorUAData.mobile")}}).
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Mobile")}} header (a low-entropy client hint).platform
"Windows" (the same information as provided by {{domxref("NavigatorUAData.platform")}}).
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Platform")}} header (a low-entropy client hint).architecture
"x86".
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Arch")}} header after the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.bitness
"32" or "64".
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Bitness")}} header if the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.formFactors
["Tablet", "XR"].
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Form-Factors")}} header if the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.fullVersionList
"brand" and "version" representing the browser name and full version respectively.
For example, {"brand": "Google Chrome", "version": "103.0.5060.134"}, {"brand": "Chromium", "version": "103.0.5060.134"}.
Please note that one object may intentionally contain invalid information to prevent sites from relying on a fixed list of browsers.
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Full-Version-List")}} header if the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.model
"Pixel 2XL". If device is not a mobile device or if device model is not known, model will be "".
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Model")}} header if the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.platformVersion
platform. For example, "10.0".
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Platform-Version")}} header if the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.uaFullVersion {{Deprecated_Inline}}
"103.0.5060.134". Deprecated in favor of fullVersionList.
Note that this information can be sent to a server in the {{HTTPHeader("Sec-CH-UA-Full-Version")}} header if the server explicitly requests it in the {{HTTPHeader("Accept-CH")}} header.wow64
NotAllowedError {{domxref("DOMException")}}
hints requested should not be returned.In the following example a number of hints are requested using the getHighEntropyValues() method.
When the promise resolves, this information is printed to the console.
navigator.userAgentData
.getHighEntropyValues([
"architecture",
"model",
"platformVersion",
"fullVersionList",
])
.then((values) => console.log(values));
{{Specifications}}
{{Compat}}