v141 · network / connectivity

Stop sending Purpose: prefetch header from prefetches and prerenders

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.

concepts

  1. Purpose Header

    Drops the legacy Purpose: prefetch header. Servers must now key on Sec-Purpose (the spec-conformant name). Caching layers that branched on the old header need a config update.

  2. Sec-Purpose Migration

    Static checker — paste your Express / nginx / edge function and flag any branches still keyed off the legacy header. Migration snippet handles all three browser headers.

  3. Analytics Double-Count

    Simulate a week of traffic three ways: pre-141, post-141 unfixed, post-141 migrated. The middle column shows how much your pageview count inflates if you miss the header rename.

  4. Header Migration Guide

    Side-by-side reference for every server framework: Express, nginx, Fastly VCL, Cloudflare Workers — each showing the old Purpose: prefetch branch and its Sec-Purpose replacement. A live header parser lets you paste a request dump and flags any remaining legacy branches.

why it shipped

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.

references