← Back to release summary

Stop sending Purpose: prefetch header from prefetches and prerenders

Category
Network / Connectivity
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Now that prefetches and prerenders are utilizing the Sec-Purpose header for prefetches and prerenders, we will move to remove the legacy `Purpose: prefetch` header that is still currently passed. This will be behind a feature flag/ kill switch to prevent compatibility issues. This will be scoped to speculation rules prefetch, speculation rules prerender, <link rel=prefetch>, and Chromium's non-standard <link rel=prerender>.

Motivation

Each browser uses non-standardized header name that is not aligned with CORS spec (Mozilla's x-moz, chrome's purpose, and Safari doesn't support prefetch yet). As part of standardizing the header names, Sec-Purpose: "prefetch" and Sec-Purpose: "prefetch;prerender" is used. This is to remove current legacy code that still adds the Purpose: prefetch header to maintain the standardized name going into the future.

Standards & signals

Docs: https://fetch.spec.whatwg.org/#ref-for-http-sec-purpose%E2%91%A0 https://wicg.github.io/nav-speculation/prefetch.html#ref-for-http-sec-purpose

Explainers: https://github.com/whatwg/fetch/pull/1576

View on chromestatus.com