opyeb srihash

Guides and reference

Making a hash is the easy part. Knowing why one does not take effect is harder, so these five pieces cover both the mechanics and the diagnosis.

01What subresource integrity does — pinning an external file with one hashHow a browser evaluates SRI, the integrity syntax and where it applies, and the byte-level rules to follow when you compute the hash.02CSP hashes and nonces — two ways to allow inline codeHow Content-Security-Policy hash and nonce sources differ when allowing inline script and style, how to choose between them, and how unsafe-inline and strict-dynamic interact.03crossorigin and CORS — why SRI silently switches offWhy an integrity value on a cross-origin script is not enforced, explained through no-cors, crossorigin=anonymous, Access-Control-Allow-Origin and the use-credentials requirements.04CDN version pinning and hash drift — why a hash breaks after deployHow unversioned CDN URLs, post-build minification, line endings and charset conversion break an SRI hash, and how to pin the value in your pipeline.05Diagnosing SRI and CSP failures — from console message to causeA diagnostic order that separates algorithm, Base64, crossorigin, CSP syntax and hash mismatch problems using the block symptom and the console message.
Back to the workbench