coderef

Integrity violation reportsLimited availability

Subresource integrity violation reporting sends a report to a URL nominated by the Reporting-Endpoints header or the ReportingObserver API when a resource request violates an integrity check.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Chrome, Edge, Firefox, Safari, Chrome Android, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: IntegrityViolationReport.

Feature detection

JS · check before using
if ("ReportingObserver" in globalThis && "ReportingObserver" in ReportingObserver.prototype) {
  // ReportingObserver.ReportingObserver is available
}

Sub-features

Support for each part of the feature (7). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
ReportingObserver.ReportingObserver.options_parameter.types_property.integrity-violation138138149✕138149✕
http.headers.Integrity-Policy138138✕26138✕26
http.headers.Integrity-Policy-Report-Only138138✕26138✕26
http.headers.Integrity-Policy-Report-Only.blocked-destinations_script138138✕26138✕26
http.headers.Integrity-Policy-Report-Only.blocked-destinations_style✕✕✕✕✕✕✕
http.headers.Integrity-Policy.blocked-destinations_script138138✕26138✕26
http.headers.Integrity-Policy.blocked-destinations_style✕✕✕✕✕✕✕