---
title: "Subresource Integrity (SRI)"
category: security
status: recommended
url: https://webspecification.com/spec/security/subresource-integrity/
updated: "2026-07-02T00:00:00.000Z"
sources:
- title: "Subresource Integrity (W3C Working Draft)"
url: "https://www.w3.org/TR/SRI/"
publisher: "W3C"
- title: "Subresource Integrity — §3.8 Integrity-Policy (W3C Editor's Draft)"
url: "https://w3c.github.io/webappsec-subresource-integrity/#integrity-policy-section"
publisher: "W3C"
- title: "MDN — Integrity-Policy header"
url: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Integrity-Policy"
publisher: "MDN"
- title: "OWASP — Third Party JavaScript Management Cheat Sheet"
url: "https://cheatsheetseries.owasp.org/cheatsheets/Third_Party_Javascript_Management_Cheat_Sheet.html"
publisher: "OWASP"
source_repo: undefined
licence: CC-BY-4.0
---
# Subresource Integrity (SRI)
> SRI adds a cryptographic hash to every third-party script and stylesheet so the browser refuses to run modified files. Essential for any external JS or CSS you depend on.
## What it is
Subresource Integrity is a W3C standard that lets you pin the exact content of a script or stylesheet. You include a cryptographic hash of the file in the `integrity` attribute, and the browser refuses to execute the resource if the hash does not match.
```html
```
SRI applies to `