MDN self-hosted library · e01.org

User-Agent Client Hints API

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<iframe src="https://a.example.com" allow="ch-ua-high-entropy-values"></iframe>
js
console.log(navigator.userAgentData.brands);
js
navigator.userAgentData
  .getHighEntropyValues([
    "architecture",
    "model",
    "platform",
    "platformVersion",
    "fullVersionList",
  ])
  .then((ua) => {
    console.log(ua);
  });