bowser
bowser copied to clipboard
Support: User Agent string will be reduced In a future version of Chrome
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
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.
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
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) });