Open Bug 1750143 Opened 3 years ago Updated 17 days ago

Implement navigator.userAgentData

Categories

(Core :: DOM: Core & HTML, enhancement)

Firefox 98
enhancement

Tracking

()

People

(Reporter: 709922234, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: parity-chrome)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
See Also: → client-hints
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: parity-chrome
OS: Unspecified → All
Hardware: Unspecified → All
See Also: → 1865766

Supporting navigator.userAgentData would allow Duo authentication to support Firefox on Windows (because Duo could then differentiate between Windows 10 and 11) and would allow us to freeze the Fenix UA's Android version number (as "Android 10" like Chrome, bug 1865766).

https://help.duo.com/s/article/3455
https://help.duo.com/s/article/7220

Added support for the User-Agent Client Hints API, which improves the accuracy of browser and OS version information provided by the browser to the Duo Prompt for use with policy enforcement. The User-Agent Client Hints API is available in the following browsers: Chrome on all platforms, and Edge Chromium on macOS.

https://community.cisco.com/t5/duo-release-notes/d238-duo-release-notes-for-april-15-2022/ta-p/4878082

https://help.duo.com/s/article/4154

See Also: → 1876742

Example code to dump the navigator.userAgentData values:

navigator.userAgentData.getHighEntropyValues([
  "architecture",
  "bitness",
  "brands",
  "formFactor",
  "fullVersionList",
  "mobile",
  "model",
  "platform",
  "platformVersion",
  "uaFullVersion",
  "wow64"
  ])
.then(value => {
  console.log(value);
});

Windows' platformVersion values:

https://learn.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11

Severity: -- → N/A
Summary: Implement Navigator.userAgentData → Implement navigator.userAgentData
Blocks: 1865766
See Also: 1865766

    I question the necessity of such interfaces' existence.
    Why would the remote need to know about that?

Websites that offer applications in multiple formats for different operating systems and architectures can send you the proper file automatically if they know what you use.
If you have a phone or tablet, it can adjust features and layout compared to a computer with keyboard.
There are benefits, but not all pages or web apps need this.

If you have a phone or tablet, it can adjust features and layout compared to a computer with keyboard.

What about a phone or tablet with a keyboard (and a mouse)?

Layout can already be adjusted with media query, regardless of how you categorize the device. Touchability can also be queried (I forgot how). I hate when websites assume a typical use case and don't support the other (e.g. a phone with a keyboard and/or a mouse).

    Downloading for other architectures appears fairly common.
    Regardless, the users shall be aware of what they download.

You need to log in before you can comment on or make changes to this bug.