platform.js
platform.js copied to clipboard
Detect Windows 11 (User-Agent Client Hints)
Hi. This library is extremely helpful!
Recently we came across the issue, that browsers don't report Windows 11 in the user agent string anymore.
A research revealed that there's a shift to new "User-Agent Client Hints" [1] and Windows made it even official [2] and forces developers to use this feature as the only way to detect Windows 11 (at least in Edge).
It would be awesome to see this feature also in platform.js.
Thanks in advance!
[1] https://web.dev/migrate-to-ua-ch/ [2] https://docs.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11
If you use user-agent to detecting OS, you can consider to use UAParser.js.