platform.js icon indicating copy to clipboard operation
platform.js copied to clipboard

Detect Windows 11 (User-Agent Client Hints)

Open opusonline opened this issue 4 years ago • 1 comments

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

opusonline avatar Dec 06 '21 12:12 opusonline

If you use user-agent to detecting OS, you can consider to use UAParser.js.

culdo avatar Apr 24 '23 07:04 culdo