← Home ← Codex ← DEBT
Browse by Category
+ added · updated 7d
← Back to glossary

HTTP/2 Server Push & Early Hints

Networking Intermediate
debt(d7/e5/b3/t7)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). No detection_hints.tools are provided for this term. The misuse (pushing already-cached assets, sending 103 after output starts, hinting too many resources) typically surfaces only via careful network inspection (WebPageTest, Chrome DevTools waterfall analysis) or real-user monitoring — not via a linter or static tool. Bandwidth waste from cache-unaware push is silent in normal development.

e5 Effort Remediation debt — work required to fix once spotted

Closest to 'touches multiple files / significant refactor in one component' (e5). No quick_fix is provided. Fixing cache-aware Server Push requires coordinating server-side push logic with cache headers and potentially CDN configuration. Switching from Server Push to Early Hints, or tuning which resources are hinted, spans server configuration, application middleware, and possibly CDN rules — more than a one-liner but not a full architectural rework.

b3 Burden Structural debt — long-term weight of choosing wrong

Closest to 'localised tax' (b3). HTTP/2 push and Early Hints configuration is typically scoped to the server/CDN layer and the set of critical-path resources for a page. It doesn't impose a strong gravitational pull on the rest of the codebase, though it does require ongoing maintenance as resource sets change and cache behaviour must be monitored.

t7 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'serious trap — contradicts how a similar concept works elsewhere' (t7). The misconception field states explicitly: 'HTTP/2 Server Push is not the same as preload — Push sends the bytes unconditionally; a preload hint lets the browser decide whether to fetch based on its cache.' A competent developer familiar with <link rel=preload> will naturally assume the browser has agency over the fetch, but Server Push bypasses that, wasting bandwidth on already-cached assets. This directly contradicts the mental model of related preload mechanisms.

About DEBT scoring →

TL;DR

HTTP/2 Server Push lets a server proactively send assets (CSS, JS, fonts) before the browser requests them. 103 Early Hints is its practical successor — sending Link preload headers before the full response is ready.

Explanation

HTTP/2 Server Push allowed servers to send additional resources alongside the initial HTML response, avoiding a round trip for critical assets. In practice it suffered from a fundamental problem: the server cannot know which assets the browser already has cached, leading to wasted bandwidth pushing already-cached resources. Major CDNs (Cloudflare, Chrome) deprecated or removed Server Push support. 103 Early Hints (RFC 8297) is the modern replacement — the server sends a preliminary 103 response with Link: rel=preload headers immediately, while still generating the full page. The browser starts fetching those assets during the server think-time. Unlike Push, the browser controls whether to actually fetch each hint, respecting its own cache. In PHP this is emitted with header('HTTP/1.1 103 Early Hints') before any output.

Watch Out

Server Push was deprecated by Chrome in 2022 and removed by several major CDNs — do not invest in implementing it. Use 103 Early Hints or Link preload headers instead.

Common Misconception

HTTP/2 Server Push is not the same as preload — Push sends the bytes unconditionally; a preload hint lets the browser decide whether to fetch based on its cache.

Why It Matters

103 Early Hints can shave 100–500ms from perceived load time on server-rendered pages by overlapping asset fetches with server processing time — a measurable Core Web Vitals improvement.

Common Mistakes

  • Using Server Push without cache-awareness — pushing already-cached assets wastes bandwidth and can trigger redundant downloads.
  • Sending 103 Early Hints after output has started — the 103 must be sent before any body bytes.
  • Hinting too many resources — hinting 20 assets defeats the purpose; hint only render-blocking critical resources.

Avoid When

  • Avoid HTTP/2 Server Push for new projects — browser support is being removed; use 103 Early Hints or <link rel=preload> instead.
  • Do not hint resources that are already in the browser cache for returning users — measure cache hit rates before adding hints.

When To Use

  • Send 103 Early Hints for render-blocking CSS and critical fonts on server-rendered pages where DB or API latency is the bottleneck.
  • Use Early Hints via CDN (Cloudflare, Fastly) when your origin supports it — the CDN can replay hints from cache without hitting origin.

Code Examples

💡 Note
The 103 response is sent immediately before the slow DB work begins — the browser fetches critical CSS during the server think-time, so the render-blocking resource arrives before the HTML does.
✗ Vulnerable
// Server Push — deprecated, may be ignored or cause duplicate downloads:
header('Link: </style.css>; rel=preload; as=style', false);
// Some servers interpret this as a push directive
✓ Fixed
// 103 Early Hints — modern, cache-aware:
header('HTTP/1.1 103 Early Hints');
header('Link: </critical.css>; rel=preload; as=style', false);
header('Link: </font.woff2>; rel=preload; as=font; crossorigin', false);
ob_flush(); flush();

// ... expensive DB queries happen here ...
// Browser is already fetching CSS and font in parallel

Added 31 Mar 2026
Views 34
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
1 ping T 0 pings W 0 pings T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 1 ping W 0 pings T 1 ping F 1 ping S 0 pings S 2 pings M 0 pings T 0 pings W 1 ping T 1 ping F 1 ping S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 0 pings F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W
No pings yet today
No pings yesterday
Google 4 Ahrefs 3 Scrapy 3 Claude 2 Meta AI 2 SEMrush 2 Perplexity 1 Bing 1 Majestic 1 Sogou 1
crawler 18 crawler_json 2


✓ schema.org compliant