Skip to content
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

Implementing client hints support #138

Open
DamonOehlman opened this issue May 4, 2020 · 0 comments
Open

Implementing client hints support #138

DamonOehlman opened this issue May 4, 2020 · 0 comments

Comments

@DamonOehlman
Copy link
Owner

A big thanks to @scottcanoni who fired through an email to me flagging the upcoming deprecation and freezing of the Chrome UA string, which will mean that detection of Chrome will be version locked at Chrome 85 as we move into the future.

see: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/-2JIRNMWJ7s/yHe4tQNLCgAJ

Now I've had a quick gloss over the client hints API (what's coming into replace user agent strings) and I think what is being done there looks excellent. More details on what is being exposed to the browser can be found at the following URL:

https://wicg.github.io/ua-client-hints/#create-brands

So what's the impact of this on detect-browser?

In the short term, this package should help to ease the transition as client hints are rolled out across browsers, i.e. it should continue to work as it does, returning the same structured responses but using client hints to get that information.

Longer term, however, it should probably be deprecated. This is, of course, assuming that browser vendors do a good job of the implementation and developers can rely on those client hints for accurate information. If in the event that this doesn't happen, OR, we consider the value of having a discrete set of known values for browsers (provided by the typescript literal union) valuable detect-browser will continue to exists. This is a larger discussion and out of scope for the immediate work, but worth raising now. My personal view is that a package should only live as long as it is needed, and then point people towards the appropriate (and often better) solution that has been implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant