-
-
Notifications
You must be signed in to change notification settings - Fork 311
E007
Only one copy of Bootstrap's JS should be included; currently the webpage includes both bootstrap.js
and bootstrap.min.js
bootstrap.js
and bootstrap.min.js
both contain the same code, bootstrap.js
in its original format, and bootstrap.min.js
in a minified format. So it is not necessary to include both. You should remove the duplicate <script>
tag from your webpage.
The original format (bootstrap.js
) is useful when debugging problems because it's human-readable. The minified format (bootstrap.min.js
) is useful for production deployments, because it is smaller in size and thus consumes less network bandwidth and downloads faster; however, it is difficult for humans to read.
Like most JavaScript, Bootstrap's JavaScript is written to assume that it won't be redundantly loaded onto the same page multiple times. It performs some setup, such as adding document-level event handlers, that should only occur once per page load. Therefore, either bootstrap.js
or bootstrap.min.js
, but not both, should be included in your webpage.
Bootlint documentation wiki content is licensed under the CC BY 3.0 License, and based on Bootstrap's docs which are copyright Twitter, Inc.