compat
compat copied to clipboard
Consider collaborating with UACH on standardized "enum" values
https://wicg.github.io/ua-client-hints/ has gone further than https://compat.spec.whatwg.org/#ua-string-section by trying to lock down some "enum" values. Namely:
- They suggest "platform" should be one of "Android", "Chrome OS", "iOS", "Linux", "macOS", "Windows", or "Unknown".
- They suggest "architecture" must be one of "x86", "arm", or the empty string.
- They have a single bit for wow64-ness and a single bit for mobile-ness.
- They have an extensive algorithm for platform version
It might be worth having a common foundation, probably living in the Compat Standard, which these two share. I'm envisioning something like:
Recommended platforms
Platform name UA String <platform>
UA string <oscpu>
Windows
Windows NT 10.0
Win64; x64
...
and then the UACH spec says to use the platform name, and the UA string part of the Compat spec says to pick a platform row and use the corresponding <platform>
and <oscpu>
columns.
The main thing here is not to waste work on stuff that we think will not exist in the UA string in the future. But I think platform is likely to stay, as is the mobileness bit.
Thanks for the suggestion, I think it's a good idea. I'll try to find the time to tackle this in Q2 (not putting a year, just in case™).