coderef

CSP violation reportsBaseline · Newly available

CSP violation reporting sends a report to a URL nominated by the Reporting-Endpoints header or the ReportingObserver API when a page violates its content security policy.

Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Mar 24, 2026.

Browser support

DesktopChrome
1–73Not supported
74+Supportedsince Apr 23, 2019
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–148Not supported
149+Supportedsince Mar 24, 2026
Current: 157
Safari
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27
MobileChrome Android
18–73Not supported
74+Supportedsince Apr 24, 2019
Current: 155
Firefox Android
4–148Not supported
149+Supportedsince Mar 24, 2026
Current: 157
Safari iOS
1–18.3Not supported
18.4+Supportedsince Mar 31, 2025
Current: 27

How to use

Every current browser supports this, but it only became Baseline on Mar 24, 2026. Use it as a progressive enhancement, or keep a fallback if you support older devices.

Example

Full syntax and examples are on MDN: CSPViolationReport.

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 (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
ReportingObserver.ReportingObserver.options_parameter.types_property.csp-violation747914918.47414918.4
http.headers.Content-Security-Policy.report-to707914916.47014916.4