I have generated the SHA-256 and added in the integrity tag like below.

<script type="text/javascript" integrity="sha256-65DEQpj8HBSb+/YImG+9LCeuQeRkm5NMpJWTH6hSuFZ+" src="example.com/media/js/90a8720cd608ccab8eaf40398728caf8.js">

I am getting the below error in the console:

Failed to find a valid digest in the 'integrity' attribute for resource 'example.com/media/js/90a8720cd608ccab8eaf40398728caf8.js' with computed SHA-256 integrity "65DEQpj8HBSb+/YImG+9LCeuQeRkm5NMpJWTH6hSuFZ+" The resource has been blocked.

I have also tried with SHA-384 and SHA-512.


  • the script you draw in(maybe in CDN) has changed.But your html used integrity to ensure the file not changed.... – Anas Mansuri Sep 9 at 6:27
  • try with <script src="example.com/media/js/90a8720cd608ccab8eaf40398728caf8.js" integrity="sha256-65DEQpj8HBSb+/YImG+9LCeuQeRkm5NMpJWTH6hSuFZ+" crossorigin="anonymous"></script> – Anas Mansuri Sep 9 at 6:29
  • The file name is the same. I have tried with attribute crossorigin="anonymous", but still getting the same error. – Arun-systematix Sep 9 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.