Skip to content

add(performance): a page on the Vary header - #204

Draft
jdevalk wants to merge 1 commit into
mainfrom
add/vary-header-2026-09-07
Draft

add(performance): a page on the Vary header#204
jdevalk wants to merge 1 commit into
mainfrom
add/vary-header-2026-09-07

Conversation

@jdevalk

@jdevalk jdevalk commented Sep 7, 2026

Copy link
Copy Markdown
Owner

What changed

New spec page: /spec/performance/vary/Vary — the cache key contract, status recommended, order: 51 (immediately after cache-control).

Also:

  • relatedSlugs wired on cache-control, compression, conditional-requests, no-vary-search (performance) and markdown-source-endpoints (agent-readiness).
  • The passing Vary bullets on cache-control and compression now link to the new page.
  • Changelog entry 2026-09-07-vary-header.md (added).
  • OG image for the new page, plus the four count-driven images the 168 → 169 bump touches.
  • SKILL.md page count + agent-skills/index.json digest re-signed via npm run sign:skill.

npm run build passes; lint and format:check clean; pre-commit hook green.

Why now

Vary was referenced in passing on six existing pages and had no page of its own — a gap that stands out because this site's own middleware depends on Vary: Accept for every canonical spec URL (functions/_middleware.ts, and CLAUDE.md lists removing it under "things you should not break"). Speccing what we already ship.

The second prompt was the deployment data in Mark Nottingham's HTTP Workshop analysis (7 August 2026): ~26% of responses in the Tranco top 100,000 vary on more than one axis, roughly 3,000 sites list four or more fields, with outliers at 47. That is the over-varying failure, which nothing on the site currently warns about, and it pairs directly with the normative "SHOULD NOT include an excessive number of fields" in RFC 9110 §12.5.5.

Primary sources

Status justification

recommended, not required. A missing Vary is only a contract breach when the server actually negotiated on a request header — RFC 9110 says MUST in that case. A site that serves one representation per URL and lets its CDN handle encoding needs nothing, so required would overstate the bar. The failure mode when it is needed is severe (a shared cache handing one client's representation to another), which is why it is not optional.

Notes

  • The page carries a "this site ships it" line pointing at the Markdown source endpoints page.
  • No new discoverable resource, so no api-catalog or Link header change.
  • MCP Worker redeploy is the usual post-merge step; not done here.

🤖 Generated with Claude Code

Vary was referenced in passing on six pages but had no page of its own,
despite this site depending on Vary: Accept for every spec URL.

Covers the misconception (Vary extends the cache key; it is not a
freshness control), both failure modes — negotiating on an unlisted
header, and over-varying until nothing matches — and the RFC 9111 4.1
matching rules that make header normalisation matter.

Sources: RFC 9110 12.5.5, RFC 9111 4.1, MDN, plus Nottingham's 2026
Common Crawl deployment figures for the over-varying case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying specification-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3a411ff
Status: ✅  Deploy successful!
Preview URL: https://e5fa4140.specification-website.pages.dev
Branch Preview URL: https://add-vary-header-2026-09-07.specification-website.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant