Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I'm having an issue in the console browser whenever I import the bootstrap.bundle.min.js

I'm a new to web development. I'm having an issue in the console browser whenever I import the bootstrap.bundle.min.js saying:

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. In a future version of Chrome, 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. Note that for performance reasons, only the first access to one of the properties is shown.

AFFECTED RESOURCES 1 source bootstrap.bundle.min.js:1

I read the problem, how to fix it and also google it, but I'm really having a hard time understanding it and how to solve it...

might have someone here to help me... thank you in advance

issue screenshot

like image 958
Code 98 Avatar asked Aug 11 '21 06:08

Code 98


1 Answers

This is a warning by Chrome that they'll be restricting use of the userAgent string in the future. It basically means that the script you're loading may not work properly at some point, and you (the Bootstrap team) should work toward replacing use of those properties with other techniques.

There's nothing you need to do about it for now. Ideally the Bootstrap team will deal with it in a future release, or they'll pressure the Chromium team to delay such restrictions.

That said, Bootstrap 4 end-of-life is slated for November of 2022. You might consider migrating to Bootstrap 5 during that time to avoid complications down the road. The migration isn't too painful, mostly involving find-and-replace of class and attribute names plus a few other markup fixes for most apps.

like image 138
isherwood Avatar answered Sep 21 '22 17:09

isherwood