v151 · loading · http header

The on-prefetch-activation header

Under the proposal, a prefetched response can name a same-origin endpoint and an enabled browser dispatches a credentialless HEAD request after that response commits as a navigation. This page validates the header and previews the proposed request shape; it does not send or observe the server request.

1 · Speculation Rules on the referrer

2 · Response header on the prefetched page

3 · Proposed activation request shape

Server route needed (this showcase can't emit response headers from static demo files).
TODO for a maintainer: add a route v151/prefetch-activation-beacon/prefetched in server.ts that returns a small HTML body plus header on-prefetch-activation: ./beacon, and a route v151/prefetch-activation-beacon/beacon that logs the incoming credentialless HEAD request. The referrer would prefetch ./prefetched via speculation rules; navigating to it could then exercise the origin-trial-enabled round trip. Until then this concept validates the author-controlled header/endpoint rules and previews only the proposal's request properties. The prefetch-and-activation concept independently proves when a navigation consumed a prefetch, not that a beacon was sent.

see also