Skip to content

How to generate the Subresource Integrity (SRI) hash

alf45tar edited this page Nov 15, 2018 · 2 revisions
  1. Load the HTML page with a wrong/random SRI hash into Chrome
  2. Right-click, "Inspect Me!" and check the error into source inspector (https://developers.google.com/web/tools/chrome-devtools/).
  3. Copy and paste the calculated SRI by Chrome into your HTML file with sha256- prefix

https://www.w3.org/TR/SRI/

https://www.srihash.org/