v151 · origin trial · performance · speculation rules
Prefetch activation beacon
The on-prefetch-activation HTTP response header enables servers to specify a telemetry endpoint that the browser notifies when a prefetched resource is used for navigation. Developers gain a reliable signal to measure the precision and performance impact of their prefetch strategies.
- Register your origin for the
PrefetchAndPrerenderActivationBeacontrial at developer.chrome.com/origintrials (ChromeStatus records origin-trial id3433431765916581889) and serve the token — either as a<meta http-equiv="origin-trial" content="TOKEN">tag or anOrigin-TrialHTTP response header on the page issuing the speculation rules. - For local development, launch Chrome with
--enable-blink-features=PrefetchAndPrerenderActivationBeacon(the runtime flag record is statusexperimental,public: true,origin_trial_feature_name: "PrefetchAndPrerenderActivationBeacon"). - There is no merged specification yet — the explainer is the only substantive document (see specifications); behavior may change before a ship decision.
Serving the token, and local testing:
<meta http-equiv="origin-trial" content="TOKEN_FROM_DEVELOPER.CHROME.COM/ORIGINTRIALS">
# local development instead of a token:
chrome --enable-blink-features=PrefetchAndPrerenderActivationBeacon
Enrollment notes: no feature-specific error surface exists for enrollment — the trial uses Chrome's standard origin-trial infrastructure, and neither the explainer nor the ChromeStatus record defines feature-specific token-failure behavior (2026-07-28). Enrollment adds no data exposure of its own: the origin-trial token is static and origin-scoped; the privacy-relevant data flow is the beacon itself, analyzed under security and privacy.
at a glance
| What it is | An HTTP response header, on-prefetch-activation, that registers a same-origin telemetry endpoint; the browser sends a credentialless HEAD request to that endpoint when the prefetched (or prerendered) document is actually consumed by a navigation |
|---|---|
| Milestone listing | Chrome 151 — Origin trial (listing, verified 2026-07-28; the listing is authoritative per gendn invariant #2) |
| Applies to | Speculation Rules API prefetch and prerender loads — explicitly not legacy <link rel=prefetch>/<link rel=prerender> and not subresource prefetch (explainer non-goals) |
| Beacon request | HTTP HEAD, credentialless (no cookies/auth headers), dispatched post-commit by the browser navigation stack; not interceptable by Service Workers, page JavaScript, or extensions |
| Endpoint restriction | Same-origin with the prefetched page (validated against the final response URL after redirects); one-time use; discarded if the user navigates away from the referring page |
| Runtime feature | PrefetchAndPrerenderActivationBeacon (status experimental, public, origin-trial-gated) in runtime_enabled_features.json5 |
| WPT | Two tentative tests: prefetch and prerender activation beacons |
| ChromeStatus | 5118934710878208 — Prefetch activation beacon (blink component Blink>Loader>Preload) |
why it exists
Sites that use the Speculation Rules API need to know how often their prefetches actually pay off. Today that measurement relies on client-side JavaScript (for example a sendBeacon fired when the page becomes visible), which the explainer rejects as unreliable for three reasons:
- Cache ambiguity — telemetry often filters back/forward navigations to avoid double-counting, but back/forward navigation to prefetched pages is then missed entirely.
- Duplicate reporting — cache restores can re-run scripts, producing duplicate activation signals and wrong attribution.
- Race conditions — scripts often fail to execute early enough to capture rapid page transitions.
Because the activation beacon is dispatched directly by the browser's navigation stack when a prefetch is consumed, it is immune to all three failure modes: no script executes, no Service Worker boots, and no extension can block, delay, or tamper with the signal.
Source: explainer — considered alternatives; explainer — browser mechanismsyntax
The server includes the header on the response to the speculative (prefetch or prerender) request. The value is the relative URL of the telemetry endpoint:
on-prefetch-activation: <relative-endpoint-path>
Key properties of the grammar:
- The value is a relative URL resolved against the prefetched page's URL — the reported endpoint is always same-origin with the prefetched page (see origin boundaries).
- The server can embed its own identifiers (for example an event id) as URL parameters; the browser echoes them back verbatim and adds nothing of its own (the “echo back” principle).
- Only the header on the final response is honored when the speculative request redirects; headers on intermediate redirect responses are dropped (see redirect rules).
on-prefetch-activation with a relative URL)
browser mechanism
- The browser process consumes the header from the prefetch response and associates the endpoint URL with the prefetched document in its internal cache.
- Activation is defined as the point at which a document loaded via a speculative trigger transitions to the active state in its browsing context — typically when a user-initiated navigation is satisfied by the previously prefetched response.
- The beacon is dispatched after the navigation commits (post-commit dispatch), so the signal means the page was actually shown to the user, not merely speculated.
- The browser sends a credentialless HTTP
HEADrequest to the endpoint — no cookies, no authentication headers, no stored credentials. - Dispatch is non-interceptable: it does not pass through the origin's Service Worker, cannot be observed or modified by client-side JavaScript, and cannot be blocked by browser extensions.
endpoint lifetime and devalidation
To prevent “zombie” beacons from unrelated navigations, the activation trigger has a deliberately short, scoped lifetime:
| Rule | Contract |
|---|---|
| One-time use | The trigger is valid for a single activation event; once the beacon fires it is devalidated for the page |
| Referrer-bound | The trigger is tied to the speculative context of the triggering (referrer) document — if the user navigates away from the referrer page to an unrelated destination, the activation metadata is discarded |
| No general cache persistence | The beacon does not fire for general navigations that later hit the disk cache after the speculative context expired; it fires only when the speculative loading logic explicitly consumes the response for a predicted navigation |
| No cross-session state | Activation metadata lives in the browser's speculative loading context and is discarded when that context expires; nothing persists across browsing sessions (Security & Privacy Questionnaire §6) |
The explainer's three canonical scenarios:
- Same-origin prefetch and activation — the user loads
a.com/, which prefetchesa.com/target; the beacon is sent when the user then navigates toa.com/target. - Cross-origin prefetch and activation —
a.com/prefetchesb.com/target; the beacon is sent (to theb.comendpoint only) when the user navigates tob.com/target. - Devalidation on navigating away —
a.com/prefetchesa.com/target, then the user navigates toc.com; the beacon is not sent when the user later navigates toa.com/target.
The same rules as a state summary:
active speculative context + committed navigation → beacon sent once → trigger devalidated
referrer navigated away before activation → activation metadata discarded (no beacon)
speculative context expired (disk-cache hit) → no beacon
second navigation to the same prefetched page → no beacon (one-time use)
Source: explainer — endpoint lifetime; explainer — examples; Security & Privacy Questionnaire §6
origin boundaries
To prevent the API from becoming a cross-site tracking vector, the reporting endpoint must be same-origin with the prefetched page:
- If the browser prefetches
target.comon the user's initiative, the beacon can only go to an endpoint ontarget.com. - If
referer.comprefetchestarget.com, the beacon can still only go totarget.com— reporting back toreferer.comor any third partyother.comis prohibited.
Only the site being prefetched — which already learns that the user visited — receives the signal.
Source: explainer — origin boundaries; Security & Privacy Questionnaire §14redirect rules
| Phase | Rule |
|---|---|
| Speculative navigation redirects | Only the on-prefetch-activation header in the final response is processed |
| Headers on intermediate redirect responses are ignored and dropped | |
| Same-origin validation is checked against the final response's URL, not the initial request URL | |
| Beacon request redirects | The beacon HEAD request may only redirect to URLs same-origin with the original beacon URL |
| A redirect to a cross-origin URL causes the browser to immediately block and discard the request | |
The method must remain HEAD; a redirect that changes the method (e.g. a 302 that would turn it into GET) is blocked |
coverage: prefetch, prerender, and explicit non-goals
The Chromium runtime feature is named PrefetchAndPrerenderActivationBeacon and WPT carries both a prefetch and a prerender activation-beacon test, so the feature covers both Speculation Rules load types. One explainer sentence — that the beacon fires when the navigation “is successfully committed in a non-prerender context” — reads against that; the redirect section, the flag name, and the prerender WPT all treat prerender activation as in scope. gendn records the wording difference rather than resolving it.
Explicit non-goals (the header has no effect here):
- Legacy
<link rel=prefetch>/<link rel=prerender>loads — those are being deprecated in favor of the Speculation Rules API. - Subresource prefetches (images, scripts) — “prewarm” mechanisms or specialized APIs are the intended measurement path.
- Acting as a dynamic data channel for arbitrary client-side state — the beacon only ever reports the server-defined activation event.
examples
A server opting a prefetched page into activation reporting:
# Response to the speculative (prefetch) request
HTTP/1.1 200 OK
Content-Type: text/html
on-prefetch-activation: /telemetry/prefetch-hit?rule=product-page&id=92
When the user later navigates to that prefetched page and the navigation commits, the browser sends — once, with no cookies or authorization headers:
HEAD /telemetry/prefetch-hit?rule=product-page&id=92 HTTP/1.1
Host: shop.example
The page that issues the speculation needs nothing new beyond its normal speculation rules (plus the origin-trial token):
<script type="speculationrules">
{
"prefetch": [{ "urls": ["/products/92"] }]
}
</script>
security and privacy
- “Echo back” principle — the browser conveys no new client-side information: it echoes only the URL and parameters the server itself provided. The API generates no identifiers (Questionnaire §2, §13).
- Static & non-modifiable — the beacon URL comes from an HTTP header, so third-party JavaScript cannot read or rewrite it and cannot inject tracking identifiers into it.
- Origin boundaries — the endpoint is same-origin with the prefetched page; cross-origin reporting is prohibited and cross-origin beacon redirects are blocked (see origin boundaries and redirect rules).
- Credentialless — no cookies, authentication headers, or stored credentials, so the beacon cannot join user sessions across security contexts.
- No persistent state — activation metadata is scoped to the speculative loading context and discarded on expiry; nothing persists across sessions (Questionnaire §6).
- No new script execution — the beacon runs in the browser navigation stack; it boots no Service Worker and runs no page script (Questionnaire §10).
error and edge behavior
| Situation | Behavior (per explainer) |
|---|---|
| Endpoint not same-origin with the prefetched page | Reporting prohibited — the cross-origin beacon is not sent (origin boundaries) |
| Header present on an intermediate redirect response | Ignored and dropped; only the final response's header is honored |
| Beacon redirect goes cross-origin | Browser immediately blocks and discards the request |
| Beacon redirect would change the method (e.g. 302 → GET) | Blocked — the method must remain HEAD |
| User navigates away from the referrer before activation | Activation metadata discarded; no beacon (lifetime rules) |
| Second navigation to the same prefetched page | No beacon — the trigger is one-time use |
| Endpoint failure / network error on the beacon request | Not specified in the explainer; no retry contract is defined anywhere in the sources (recorded as an open question in the critique) |
web platform tests
The feature has upstream (tentative) WPT coverage under speculation-rules/activation-header/:
prefetch-activation-beacon.tentative.https.html— prefetches a URL served with the header, navigates to it, then polls a server-side stash to assert the beacon was received (and the resource was actually fetched).prerender-activation-beacon.tentative.https.html— the same flow through a prerender triggered by speculation rules.resources/activation_beacon.py— the test server: emitson-prefetch-activationwith a relative URL, and rejects any beacon request whose method is notHEADwith a405.
Both tests are tentative, matching the feature's pre-ship status.
browser compatibility
Interim table. There is no BCD entry (BCD http/headers/ has no on-prefetch-activation.json, verified 2026-07-28) and no web-features entry (webstatus.dev query, zero matches). Rows below are compiled from the linked primary sources, not from BCD.
| Browser | Support | Evidence |
|---|---|---|
| Chrome | Origin trial from 151 | milestone=151 listing (“Origin trial”); flag record (experimental, origin-trial-gated) |
| Edge | Not separately reported | Chromium-based; no separate position on the ChromeStatus record |
| Firefox | No signal | ChromeStatus API record vendor views |
| Safari | No signal | ChromeStatus API record vendor views |
specifications
| Document | Status |
|---|---|
| Prefetch Activation Beacon API — explainer (proponent: Jiacheng Guo, Google) | The only substantive specification document (header syntax, mechanism, lifetime, redirect and privacy rules) |
| Security & Privacy Questionnaire | Completed, in the same repository |
| WICG/proposals #284 | Incubation proposal, open |
| index.bs (Bikeshed) | An unfilled template (“The TODO API”) as of 2026-07-28 — no formal spec text exists yet; treat the explainer's contracts as proposal-stage |
see also
- Chrome Platform Status — Prefetch activation beacon (API record)
- blink-dev — Intent to Prototype: Prefetch activation beacon (mail-archive mirror)
- blink-dev — Intent to Experiment: Prefetch activation beacon (mail-archive mirror)
- MDN — Speculation Rules API (the host API; MDN does not cover this header — MDN header URL 404, search returned no matching document, 2026-07-28)
- Chrome origin trials console (trial
PrefetchAndPrerenderActivationBeacon, id3433431765916581889) - Chrome Platform Showcase — interactive demo for this feature