Deprecation
The deprecation report warns when a page uses a web platform feature the browser plans to remove.
Last update:
A deprecation report tells you that the page used an API the browser has marked
for removal. It is an early-warning signal: you find out which code path relies on
a feature that will stop working, with a source location, before it breaks in a
future release.
Non-standard
Deprecation reporting is a WICG draft, not a W3C standard. Chromium implements it fully, and Firefox 149 added partial support. Use it as a heads-up, not as a guaranteed cross-browser signal.
When the browser sends it
When the page uses a deprecated API. The report goes to the default reporting endpoint
in Reporting-Endpoints (it has no per-policy directive), and it is also observable
in the page through ReportingObserver,
which is useful for surfacing deprecations to developers during a build.
Payload example
{
"type": "deprecation",
"age": 32,
"url": "https://example.com/",
"user_agent": "Mozilla/5.0 ...",
"body": {
"id": "XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload",
"message": "Synchronous `XMLHttpRequest` on the main thread is deprecated ...",
"sourceFile": "https://example.com/app.js",
"lineNumber": 54,
"columnNumber": 11
}
}Every deprecation report body carries these fields inside the shared report envelope.
Field reference
| Field | Meaning |
|---|---|
id | A machine-readable feature identifier, the stable key to group by. |
message | A human-readable description of the deprecation. |
anticipatedRemoval | The planned removal date, in milliseconds since the Unix epoch. Optional, and Chromium never sets it: the key is absent from the POSTed report and null in ReportingObserver. |
sourceFile | The file that used the deprecated API. |
lineNumber / columnNumber | The location in that file. |
How to receive it
Declare a default endpoint in Reporting-Endpoints; deprecation reports have no
other target. CentralCSP collects them at
one endpoint alongside every other type.
What it tells you about security
Deprecated APIs are often the ones with the weakest defaults (synchronous
XMLHttpRequest, legacy crypto, insecure patterns the platform is retiring).
Clearing them removes both a future breakage and, frequently, a security weakness,
so the report is worth acting on rather than filing.
Gotchas
Do not expect anticipatedRemoval: Chromium leaves it out, so check the Chrome
release notes for the removal date. The id is the stable key to group and track by;
the message wording can change between browser versions. Chromium sends one report
per deprecated feature per page, not one per call, so counts reflect affected pages
rather than call volume.
Browser support
Chromium-based browsers emit deprecation reports to the default endpoint and to
ReportingObserver. Firefox 149 supports the deprecation type in
ReportingObserver, but not in workers, and its list of deprecations differs from
Chromium's. Safari does not emit them. Not Baseline; treat it as a Chromium-first
signal.
See also
- ReportingObserver
- intervention report
- Deprecation and intervention reports
- Deprecation monitoring in CentralCSP
- Reporting-Endpoints header
- The report delivery format