-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
(I thought I wrote about this before, but couldn't find an issue)
The Chrome team is working on a large change that plans to deprecate the user-agent string.
The current(?) Chrome 83 already freezes the string and Chrome 85 will unify it to one common string for all desktop and one for all mobile users.
As a replacement the client hints standard is proposed: https://github.com/WICG/ua-client-hints
This allows to get similar data about a device already separated by things like brand, browser, os, etc. (meaning device-detector would not be needed anymore).
There is both an HTTP header (that only returns non-vague results if the server requests them) and a JS API for accessing the data.
Things that might complicate this:
the main UA value is not a string, but a list/set
Chrome"; v="73", "ChromiumBasedBrowser"; v="60", "Chromium"; v="73"
(and the corresponding dictionary from JS) is a valid response and browser vendors are encouraged to "randomly [include] additional, intentionally incorrect, comma-separated entries with arbitrary ordering".
It seems like at the moment only Chromium-based browsers are working on implementing this standard, but as it seems like these are by far the majority now, that doesn't really matter.
I added this to 4.0 RC for now as it impacts every Matomo user as the most popular user agent will display incorrect results.
Links:
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/-2JIRNMWJ7s/yHe4tQNLCgAJ
https://www.chromestatus.com/feature/5995832180473856
https://github.com/WICG/ua-client-hints
https://wicg.github.io/client-hints-infrastructure/
https://github.com/mozilla/standards-positions/issues/202#issuecomment-558294095
(Position of the firefox team on this standard)