← Chrome 147 reference

v147 · developer trial · workers · security

Document Policy in Dedicated Workers

Limited availability

  • Chrome · 147, developer trial behind a flag
  • Edge · not shipped (Edge-authored proposal)
  • Firefox · no signal
  • Safari · no signal

This capability has no web-features / Baseline entry: the ChromeStatus API record reports web_feature: "Missing feature" and a webstatus.dev query for document-policy returns no entry (both queried 2026-10-04). Vendor views are from the same ChromeStatus record (Firefox: No signal; Safari: No signal). Do not treat it as cross-browser; see the full table.

Chrome 147 adds developer trial support for Document-Policy in dedicated workers. A network-loaded worker reads its policy from its own script response, not the creating page’s response; only local blob: and data: workers clone their creator’s policy.

Developer trial This API is behind a flag in Chrome 147. Enable chrome://flags/#enable-experimental-web-platform-features, or launch with --enable-blink-features=DocumentPolicyInDedicatedWorker (the runtime flag is DocumentPolicyInDedicatedWorker, status experimental in Chromium’s runtime_enabled_features.json5, checked 2026-10-04). The API surface may change before it ships. Do not use in production.

at a glance

Status in Chrome 147Developer trial (behind a flag); dev-trial milestone 147 per the ChromeStatus API record (stage desktop_first: 147), announced in the DevTrial announcement document
Flagenable-experimental-web-platform-features / --enable-blink-features=DocumentPolicyInDedicatedWorker
SpecWICG Document Policy (Draft Community Group Report) + HTML Standard integration in whatwg/html PR #12026
ExplainerDocument Policy in Workers (MSEdgeExplainers)
Intent threadblink-dev thread (the prototype-stage intent recorded on ChromeStatus)
Tracking bugissues.chromium.org/issues/450845903
ChromeStatus6242687411945472 — Document Policy in Dedicated Workers
Source: chromestatus.com/feature/6242687411945472 (API record queried 2026-10-04)

what is Document Policy?

Document Policy is an HTTP header (Document-Policy: directive=value) that allows servers to enforce or opt into behaviours for a document. Example directives include:

Previously, these policies were defined for documents and iframes, not workers. In this dedicated-worker proposal, a network worker uses the policy declared by its script response and ignores the creating page’s policy; a local blob: or data: worker instead clones its creator’s policy. That distinction matters when configuring a server: a page response header alone cannot opt a network worker into js-profiling.

Source: WICG Document Policy; Document Policy in Workers explainer

syntax

This feature adds no new header and no new JavaScript API — it changes where the existing Document-Policy response header is read from (the worker script’s own HTTP response). The header keeps its syntax from the WICG Document Policy draft, §7.2.1, which defines it as a Structured Header whose value “must be a dictionary”:

# ABNF, quoted verbatim from WICG Document Policy §7.2.1
Document-Policy = sf-dictionary

Each dictionary member is a document policy directive: a directive name (an sf-token naming a configuration point, or *) with optional parameters — any directive may carry a report-to parameter, and integer/float/enum configuration points carry a required value parameter. The spec’s own directive examples (§7.1, verbatim):

boolean-feature
boolean-feature=?0
integer-feature=2
float-feature=-0.2
enum-feature=state

What Chrome 147’s developer trial changes is how a dedicated worker obtains its policy. Per the explainer (semantics for dedicated workers, quoted verbatim):

The worker’s effective policy is taken only from the script response for network workers — the explainer is explicit that “any creator policy is ignored (no merge/intersection)”. The spec change lands via the HTML Standard’s policy container: whatwg/html PR #12026 (“Add DP to policy-container” + “add fallback case” per the PR patch), aligning with initialize a worker’s policy container.

Source: WICG Document Policy §7.2.1; §7.1 Policies as Structured Headers; explainer; whatwg/html PR #12026 (all fetched 2026-10-04)

error handling

The header has no exception surface in JavaScript — failures are absorbed by the parsing rules:

Source: WICG Document Policy §7.2.1; Document Policy in Workers explainer (checked 2026-10-04)

examples

Serve the worker script (not just the page) with a Document-Policy header — the explainer’s example (verbatim):

Document-Policy: js-profiling

The page can then create that dedicated worker; this client-side call is illustrative glue, not a verbatim snippet or a runtime test from the explainer. The header above belongs on the worker script response, regardless of whether the page response has its own policy:

const worker = new Worker("/worker.js");

“If Document-Policy is enabled in the worker, developers can use the Profiler” (explainer example, verbatim):

// Start a profiling session
const profiler = new Profiler({ sampleInterval: 10, maxBufferSize: 10_000 });
doWork();
const trace = await profiler.stop();
console.log(JSON.stringify(trace));
Live example from the Chrome Platform Showcase (route GET-verified 200, 2026-10-04). Sibling concept demos: policy headers, policy inheritance tester, worker violation probe, and compatibility lab.Source: chrome-platform-showcase
Source: header and Profiler snippets quoted from the Document Policy in Workers explainer; new Worker() call is gendn-derived to illustrate the network-worker response model (checked 2026-10-08). The explainer does not specify a page-response example.

browser compatibility

mdn/browser-compat-data has no entry for the Document-Policy header (checked BCD v8.1.4, published 2026-10-01, on 2026-10-04: its http/headers/ tree has no Document-Policy.json, and no key anywhere in the compiled data mentions it), so the table below is interim, built from the ChromeStatus API record rather than BCD per-version data:

BrowserDocument Policy in dedicated workersNotes (interim, non-BCD)
Chrome147 — developer trial, behind a flagChromeStatus dev-trial stage desktop_first: 147; overall status “Proposed”; runtime flag DocumentPolicyInDedicatedWorker (experimental)
EdgeNot shippedProposal authored by Microsoft Edge (explainer owners); no shipped support recorded
FirefoxNo signalChromeStatus Firefox view: “No signal”, no standards-position link filed
SafariNo signalChromeStatus Safari view: “No signal”, no standards-position link filed

For the motivating gated API, BCD does have per-version data: BCD api/Profiler.json records Profiler (JS Self-Profiling) as Chrome/Edge 94, Firefox not shipped (bug 1867361), Safari not shipped — so even once workers honour Document-Policy: js-profiling, profiling remains Chromium-only.

Source: BCD http/headers tree (absence) and BCD api/Profiler.json, both verified against BCD v8.1.4 on 2026-10-04; ChromeStatus API record; runtime_enabled_features.json5

specifications

SpecificationStatus
Document Policy — §7.2.1 The Document-Policy HTTP headerDraft Community Group Report (WICG)
HTML Standard — whatwg/html PR #12026 “Add DP to policy-container”Pull request (authored 2025-12-16 by the feature owner; merge state not re-verified from this environment, 2026-10-04 — ChromeStatus records maturity “Working draft”)
Source: WICG Document Policy; PR #12026 patch; ChromeStatus API record

security and privacy

From the explainer’s Privacy and Security Considerations (quoted verbatim): “Document Policy inheritance is limited to local URLs (blob:, data:), consistent with the HTML policy container model, this prevents cross-origin policy leakage”; “Inherited policies cannot expand privileges beyond what the creator or script origin allows”; “Worker script responses define the effective policy, ensuring each origin controls its own features”; and “The proposal adds no new fingerprinting or cross-origin exposure surfaces.” The response-driven model exists precisely so that a creating document’s policy cannot be imposed on a cross-origin worker script — each origin gates its own features through its own headers.

Source: Document Policy in Workers explainer — Privacy and Security Considerations

see also