Which mechanism prevents the browser from executing a script if its integrity hash does not match the fetched content?
Key points
- SRI uses cryptographic hashes to verify file integrity.
- The integrity attribute is required on script and link tags.
- Browsers block execution if the hash mismatch occurs.
- SRI protects against compromised third-party CDNs.
Ready to go further?
