New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support User Agent Client Hints #452
Comments
+1 |
1 similar comment
+1 |
Do you have loadmap this issue? 🤔 |
Hi! Tagging a few of the maintainers to get their opinion: @commenthol @elsigh @tobie Does the project have a plan or roadmap for how to incorporate Client Hints (or, to explicitly be blind to Client Hints)? With Chrome's roadmap for the reduction and freezing of the
Starting with Chrome 101+, the UA version will be frozen to Obviously Chrome isn't the only UA in the world, but it likely accounts for a large % of website traffic. To drive home how this may affect things in 2023+, this is what a Mac may report (when Client Hints are requested):
In the above case, A similar issue already exists today for Windows 11 detection. The Windows 11 UA string (on Edge/Chrome/Opera) will say Consumers of libraries like ua-parser will start seeing incorrect data, if they don't incorporate the Some ideas for how this library could be updated to support Client Hints: Proposal 1 - ua-parser identifies frozen UA strings
Proposal 2 - ua-parser consumes and prioritizes Client Hints' data
Proposal 3 - ua-parser is blind to Client Hints
I'm sure there are more ways to approach this, but understanding what this library intends to support may help consumers (like my company) decide if we want to wait for (or build) that support into ua-parser, or just handle Client Hints in our own application. Some additional resources: |
One additional benefit of Proposal 2 (ua-parser consumes and prioritizes Client Hints' data) is to help standardize the logic for situations like Windows 11 detection. Windows 11 will have a |
@commenthol @elsigh @tobie @romenrg @cherio @mattrobenolt @dmolsen sorry to ping a few of you directly, but I think this issue deserves some attention as the timeline for the Chrome User-Agent to be frozen is fast-approaching:
In 3 months the Chrome Desktop platform will be frozen, as Mobile platform will be next Feb. In those cases, the platform version will be incorrect unless Client Hints are taken into account in some way. If there aren't any plans to update ua-parser to consume Client Hints (Proposal 3 above) that's fine! But I think at least a documentation update may be warranted to raise awareness. |
In the long run, I think Proposition 1 can be inefficient. So I like suggestion 2 more. 👍 |
Thanks for your proposals. The purpose of this library is to parse the User-Agent Header and returns information on Browser, OS, and brand model. The Client-Hints approach requires the server to interact with the client using the Accept-CH and maybe others. This means that ua-parser should not prioritize or judge values from Client-Hints as it can't do that. This would always require some logic outside ua-parser (Proposal-3). Therefore I would see this interaction with Client-Hints outside the scope of ua-parser. For legacy browsers not supporting Client-Hints I still see ua-parser as a valuable, but fading, source. |
That's a fair assessment @commenthol. I would suggest a documentation update for uap-core and/or some of the reference libraries then, possibly pointing to this issue or a brief summary of how a consumer of ua-parser should also incorporate Client Hints. I can help with that type of documentation if it would be accepted into the README. |
HI @nicjansma , |
I think there is definitely merit in a library that takes a list of http headers, parses all information possible out of it and returns the data in exactly the same format as uap-core-based libraries do. This would be very useful to build drop-in replacements that have to return the same exact browser names etc as uap-core has. I am not saying this has to be part of uap-core, and there is definitely more setup required from the developer to get the same amount of information (requesting high-entropy fields etc), but this could be a piece of logic that can be factored out. |
I recently heard about the deprecated UserAgent header. Do you plan to add related content?
See https://wicg.github.io/ua-client-hints/
The text was updated successfully, but these errors were encountered: