WICG / ua-client-hints

Wouldn't it be nice if `User-Agent` was a (set of) client hints?
https://wicg.github.io/ua-client-hints/
Other
590 stars 77 forks source link

Fixes #287 - Return a non-zero value for Win 7, Win 8, Win 8.1 #288

Closed miketaylr closed 2 years ago

miketaylr commented 2 years ago

Preview | Diff

miketaylr commented 2 years ago

Mind taking a look @recvfrom?

recvfrom commented 2 years ago

@miketaylr this looks good to me with a few comments (feel free to take them or leave them!):

[1] https://source.chromium.org/chromium/chromium/src/+/main:components/embedder_support/user_agent_utils.cc;l=91;drc=b235f34b2f135c8af5e619157ae11161d539d850 [2] https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-osversioninfoa#remarks

miketaylr commented 2 years ago

Thanks for the feedback!

Would it make sense for the spec to mention how to do this the way it does for the "get the legacy Windows version number" step? Or maybe just add a NOTE pointing to the Chrome source?

I feel like this won't be super hard to find by other implementers, and given that Chromium might change exact implementation details in the future, I think I'd prefer to leave out this particular registry key or a link to Chromium's source.

  • In the "get the legacy Windows version number" section, it might be helpful to annotate what versions of Windows the version strings "0.1", "0.2", and "0.3" correspond to, or link to [2] or something.

Good idea!