Subresource integrityBaseline · Widely available
Subresource integrity verifies that a resource, such as script served from a content delivery network, matches a known cryptographic hash. Also known as SRI.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Apr 30, 2018. Widely available since Oct 30, 2020.
Browser support
DesktopChrome
1–45Not supported
46+Supportedsince Oct 13, 2015
Current: 155Edge
12–16Not supported
17+Supportedsince Apr 30, 2018
Current: 154Firefox
1–50Not supported
51+Supportedsince Jan 24, 2017
Current: 157Safari
1–11Not supported
11.1+Supportedsince Apr 12, 2018
Current: 27MobileChrome Android
18–45Not supported
46+Supportedsince Oct 14, 2015
Current: 155Firefox Android
4–50Not supported
51+Supportedsince Jan 24, 2017
Current: 157Safari iOS
1–11Not supported
11.3+Supportedsince Mar 29, 2018
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: integrity.
Feature detection
JS · check before using
if ("HTMLLinkElement" in globalThis && "integrity" in HTMLLinkElement.prototype) {
// HTMLLinkElement.integrity is available
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLLinkElement.integrity | 45 | 17 | 43 | 11.1 | 45 | 43 | 11.3 |
| HTMLScriptElement.integrity | 45 | 17 | 43 | 11.1 | 45 | 43 | 11.3 |
| Request.integrity | 46 | 14 | 51 | 10.1 | 46 | 51 | 10.3 |
| link.integrity | 45 | 17 | 43 | 11.1 | 45 | 43 | 11.3 |
| script.integrity | 45 | 17 | 43 | 11.1 | 45 | 43 | 11.3 |