0

This is the error I am facing, however when I remove the integrity attribute from jquery there seems to be no error. What is integrity here how does it help my website. Can I remove it ?

1) *Failed to find a valid digest in the 'integrity' attribute for resource 'https://code.jquery.com/jquery-3.3.1.min.js' with computed SHA-256 integrity 'FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8='. The resource has been blocked.
util.js:55 

2) Uncaught TypeError: Cannot read property 'fn' of undefined
    at util.js:55
    at bootstrap.min.js:6
    at bootstrap.min.js:6
(anonymous) @ util.js:55
(anonymous) @ bootstrap.min.js:6
(anonymous) @ bootstrap.min.js:6*
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script type="text/javascript" src="{{ site.baseurl }}/js/script.js"></script> scroll
</html>
CoDINGinDARK
  • 244
  • 4
  • 16
  • You can use the libraries without the integrity attribute. As for what it is - https://stackoverflow.com/questions/32039568/what-are-the-integrity-and-crossorigin-attributes – Anurag Srivastava Mar 04 '19 at 09:23
  • Possible duplicate of [What are the integrity and crossorigin attributes?](https://stackoverflow.com/questions/32039568/what-are-the-integrity-and-crossorigin-attributes) – Louys Patrice Bessette Mar 04 '19 at 09:25
  • It's a cryptographic key to validate the "integrity" of the CDN... You cannot change the file source from jQuery slim to jQuery full version and use the same key. [W3C specification](https://www.w3.org/TR/SRI/#resource-integrity) – Louys Patrice Bessette Mar 04 '19 at 09:27
  • 1
    I just want to add that it is a good practice to use `Integrity` attribute. Using Cloudflare [CDN](https://cdnjs.com/libraries/twitter-bootstrap), just click on `copy > Copy Script Tag with SRI` – awran5 Mar 04 '19 at 09:38

0 Answers0