Skip to content

perf(starter): send font preloads as a Link header for Early Hints - #56

Merged
Madraka merged 1 commit into
mainfrom
perf/font-early-hints
Oct 21, 2026
Merged

Madraka merged 1 commit into
mainfrom
perf/font-early-hints

Conversation

@Madraka

@Madraka Madraka commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Step 5 of the font work after #54. Pages send their type pairing's font preloads as a Link response header (rel=preload; as=font; type="font/woff2"; crossorigin), as well as the <link rel=preload> already in <head>. With Early Hints on for the zone, Cloudflare caches these links and answers later requests with a 103 before the page, so the fonts start loading while the Worker renders. The system pairing sends nothing.

Checked: dev server responds with the header for a web-font pairing; CLI suite 165/165.

🤖 Generated with Claude Code

Pages now send their type pairing's font preloads as a `Link` response
header as well as `<link rel=preload>` in the head. On a Cloudflare zone with
Early Hints on, the edge answers with a 103 carrying those links before the
page, so the fonts start loading while the Worker renders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka merged commit 8729d56 into main Oct 21, 2026
5 checks passed
@Madraka
Madraka deleted the perf/font-early-hints branch October 21, 2026 15:23
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