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

Support: User Agent string will be reduced In a future version of Chrome #494

Open
michael-ecb opened this issue Oct 10, 2021 · 3 comments

Comments

@michael-ecb
Copy link

Hi,
there is a warning in chrome:
A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. In a future version of Chrome, the amount of information available in the User Agent string will be reduced

does this package already support it or need a new release ?

thanks

@Akazm
Copy link

Akazm commented Jan 5, 2022

I'd like to know more about this, too. Chrome now actively warns about deprecating navigator.userAgent.

Any information about this would be appreciated, @lancedikson.

@lancedikson
Copy link
Collaborator

Hi! Thanks for the heads-up! I hadn't checked it before, but a quick look into the topic showed that there's not much to change for bowser. It's only the device information that could be lost with the upcoming reduction, but the rest should be fine as I can see from the spec of the final reduced state: https://www.chromium.org/updates/ua-reduction#TOC-Sample-UA-Strings:-Final-Reduced-State

@Akazm
Copy link

Akazm commented Jan 5, 2022

Wow, thank you for your quick response!

Is there any plan on adding device information to Bowser in the future? As far as I know, some platform information was partially simply 'moved' to navigator.userAgentData.

Another, significantly more reliable option is using the Client Hints API:

navigator.userAgentData.getHighEntropyValues(
  ["architecture",
  "model",
  "platform",
  "platformVersion",
  "fullVersionList"]).then(ua => { console.log(ua) });

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

3 participants