HttpUserAgentParser icon indicating copy to clipboard operation
HttpUserAgentParser copied to clipboard

Support Client Hints

Open gfoidl opened this issue 3 years ago • 9 comments

Google Chrome's developer tools shows a hint about the usage of navigator.userAgent and navigator.userAgentData. More info: Migrate to User-Agent Client Hints

@BenjaminAbt do you have more info if we need to take this into account?

gfoidl avatar Jun 04 '22 16:06 gfoidl

If I understand the navigator thing right, thats a JavaScript DOM API and does not affect requests / our impl.

BenjaminAbt avatar Jun 04 '22 19:06 BenjaminAbt

but maybe we have to update this https://github.com/mycsharp/HttpUserAgentParser/blob/cc3701697113d0ec81550e08d93c6b651f0cf6a4/src/MyCSharp.HttpUserAgentParser/HttpUserAgentStatics.cs#L26

BenjaminAbt avatar Jun 04 '22 19:06 BenjaminAbt

Windows 11 Chrome

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36

Windows 11 Edge

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36

Cannot see any changes regarding Win11

BenjaminAbt avatar Jun 04 '22 19:06 BenjaminAbt

But there is this doc

https://docs.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11

I guess I have to test this

BenjaminAbt avatar Jun 04 '22 19:06 BenjaminAbt

I cannot see any Header Changes in the Developer Tools in Chrome, Edge oder Brave.

BenjaminAbt avatar Jun 05 '22 11:06 BenjaminAbt

Edit: I can see changes in Chrome. I was watching the wrong tab before.

image User AGent is still present

In Brave: image No new tags

In Edge same as Chrome image

I would suggest we change our behavior: first check the new headers. Then the user agent.

BenjaminAbt avatar Jun 05 '22 13:06 BenjaminAbt

I would suggest we change our behavior: first check the new headers. Then the user agent.

Sounds like a good plan.

gfoidl avatar Jun 06 '22 13:06 gfoidl

There is now a documentation

https://developer.mozilla.org/en-US/docs/Web/HTTP/Client_hints#user-agent_client_hints https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-UA#browser_compatibility

but still not implemented in all browsers

BenjaminAbt avatar Nov 23 '22 21:11 BenjaminAbt

Due to privacy reasons we still do not have client hints in all major browsers https://www.whatismybrowser.com/detect/client-hints/faq/which-web-browsers-support-client-hints

BenjaminAbt avatar Jan 08 '23 13:01 BenjaminAbt