← Back to release summary

Pass 'Sec-Purpose: prefetch' header with <link rel=prefetch>

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

Summary

Chrome currently passes both 'Purpose: prefetch' and 'Sec-Purpose: prefetch' headers as part of prefetch through speculation rules. However, only 'Purpose: prefetch' is passed with <link rel=prefetch>. We plan to standardize this header for both speculation rules and <link rel=prefetch> by adding 'Sec-Purpose: prefetch' header to the latter. Future work will involve stop sending 'Purpose: prefetch' for prefetches, prerenders, etc.

Motivation

SpeculationRules prefetch does send Sec-Purpose: "prefetch" header, but rel="prefetch" does not. The purpose headers allows servers to discern between regular requests and "resource hints" (requests that are only meant to populate caches).

Standards & signals

Explainers: https://github.com/w3c/resource-hints/issues/74

View on chromestatus.com