bestiejs / platform.js

A platform detection library.
https://mths.be/platform
MIT License
3.22k stars 408 forks source link

Add support for UA Client Hints #181

Open bnjmnt4n opened 4 years ago

bnjmnt4n commented 4 years ago

See https://wicg.github.io/ua-client-hints/.

edwardkenfox commented 3 years ago

My understanding of Client Hints is that everything happens through HTTP headers and there's really no space for JavaScript library to get involved in it? I saw the announcement by Chromium team that UA reduction is rolling out eventually which reminded me of this issue. If you have an idea supporting Client Hints somehow please do let me know and I might be able to help with needed changes, thanks a lot!

cf. User-Agent Reduction Origin Trial and Dates

fmagaldea commented 2 years ago

Interested too: https://blog.chromium.org/2021/05/update-on-user-agent-string-reduction.html > "If your site, service, library or application relies on certain bits of information being present in the User Agent string such as Chrome minor version, OS version number, or Android device model, you will need to begin the migration to use the User Agent Client Hints API instead."