最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin1浏览0评论

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

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

Share Improve this question edited Dec 22, 2021 at 13:50 isherwood 61.1k16 gold badges121 silver badges169 bronze badges asked Aug 11, 2021 at 6:23 Code 98Code 98 911 gold badge1 silver badge4 bronze badges 5
  • 1 I am experiencing the same issue. Since the detailed message mentioned Chrome, I tried Firefox and did not see the warning. Just for reference - the message is only a warning and only appears when doing an inspect. I would still feel better having a full explanation of what the issue is and if it is okay to ignore it. – sldorman Commented Aug 30, 2021 at 13:27
  • 1 Here is additional information about the source of the warning blog.chromium/2021/05/… – sldorman Commented Aug 30, 2021 at 14:21
  • I have the same error, but this only happens if I open devtools. When I close devtools website works fine – Mujtaba Commented Sep 17, 2021 at 12:34
  • I’m voting to close this question because it is about somebody else's problem — if a library you use triggers deprecation errors then monitor the situation, raise a bug report with the vendor, and consider using a different library. – Quentin Commented Dec 22, 2021 at 13:52
  • use this instead: cdnjs./libraries/twitter-bootstrap – Deadpool Commented Dec 22, 2021 at 15:05
Add a ment  | 

1 Answer 1

Reset to default 3

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 plications 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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论