WickyNilliams / headroom.js

Give your pages some headroom. Hide your header until you need it
https://wicky.nillia.ms/headroom.js/
MIT License
10.86k stars 824 forks source link

Chrome warning about navigator.userAgent, navigator.appVersion, and navigator.platform #395

Closed rocc-o closed 2 years ago

rocc-o commented 2 years ago

After I have added Headroom.js I noticed that Chrome shows a warning about accessing navigator.userAgent, navigator.appVersion, and navigator.platform:

"Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced. To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData."

More infos: https://blog.chromium.org/2021/09/user-agent-reduction-origin-trial-and-dates.html

Do you plan to update the script as per Chrome suggestions?

Thanks

rocc-o commented 2 years ago

It was not headroom.js causing the warning. Sorry.