# Streaming SSR & Progressive Flushing vs 103 Early Hints

- **Canonical URL:** https://frontend.rocks/vs/streaming-ssr-flushing-vs-early-hints-103/
- **Relation:** Contrasts With
- **Last Verified:** 2026-11-15
- **Verdict:** 103 sends Link headers before 200 OK; Streaming SSR flushes actual 200 OK HTML bytes early.

## Comparison Matrix

| Dimension | Streaming SSR & Progressive Flushing | 103 Early Hints |
| :--- | :--- | :--- |
| **Maturity** | Baseline · Widely | Baseline · Newly |
| **Domain** | Network & Performance | Network & Performance |
| **Mental Model** | Streams the HTML <head> and shell immediately over HTTP/2+ while slow backend queries run, then flushes deferred <template> chunks for out-of-order DOM replacement. | Sends an interim HTTP 103 frame with Link preload headers while the server is still rendering HTML, overlapping subresource fetches with origin think time. |
| **Prerequisites** | Preload Scanner and fetchpriority Attribute (Flushing <head> early lets the preload scanner fetch CSS and JS while the server awaits DB queries.); HTTP/2 & HTTP/3 Multiplexing (Chunked DATA frames stream progressively over a single multiplexed connection.); Streams API and Backpressure Mechanics (Streaming SSR writes HTML chunks through a ReadableStream that respects socket backpressure.) | Preload Scanner and fetchpriority Attribute (103 Early Hints feed the same speculative preload queue before the HTML parser even starts.); HTTP/2 & HTTP/3 Multiplexing (Browsers only honor 103 informational responses over HTTP/2 or HTTP/3.) |
| **When Not to Use** | When not to use Streaming SSR: On static or edge-cached pages that render in under 15 ms, full-response caching with s-maxage is simpler and avoids open long-lived connections; if client hydration cost dominates, compare against Resumability vs Hydration. | When not to use 103: On static pages served from CDN edge cache in under 20 ms, 103 adds an extra header frame with near-zero overlap benefit. |

## Streaming SSR & Progressive Flushing — Under the Hood
Classic buffered SSR holds the entire HTTP response hostage until the slowest microservice replies, starving both the [Preload Scanner](/concepts/preload-scanner-hints) and the user's screen. Streaming SSR works like a sushi conveyor belt: plates leave the kitchen as soon as they're ready over [HTTP/2 & HTTP/3](/concepts/http2-http3-multiplexing).

1. The server commits `200 OK` and flushes `<!doctype html><head>...` plus fallback placeholders immediately, dropping TTFB to ~20 ms.
2. The HTML parser builds the DOM incrementally without waiting for `</html>`, starting CSS/JS fetches and painting the shell.
3. When an async boundary resolves, the server appends a hidden `<template id="B:1">` and a 2-line inline `<script>` that swaps it into the placeholder.

```js
const stream = new ReadableStream({
  async start(controller) {
    controller.enqueue(encode('<!doctype html><html><head><link rel="stylesheet" href="/app.css"></head><body><div id="slot">Loading...</div>'));
    const data = await fetchSlowRecommendations();
    controller.enqueue(encode(`<template id="t1">${renderList(data)}</template><script>slot.replaceWith(t1.content)</script></body></html>`));
    controller.close();
  },
});
```

## 103 Early Hints — Under the Hood
Without Early Hints, a 400 ms SSR database query leaves the client's network card sitting idle, waiting for byte zero of HTML so the [Preload Scanner](/concepts/preload-scanner-hints) can discover `<link rel="stylesheet">`. `103` acts like a restaurant handing you the breadbasket while the kitchen still cooks your entrée.

1. The browser sends a navigation `GET` over [HTTP/2 & HTTP/3](/concepts/http2-http3-multiplexing).
2. The CDN edge immediately flushes a `103 Early Hints` frame containing `Link` headers for critical CSS, fonts, or API origins.
3. The browser's speculative fetcher opens TLS connections and downloads those assets in parallel with origin SSR execution.
4. When `200 OK` HTML finally arrives, render-blocking stylesheets are already sitting in the memory cache.

```http
HTTP/2 103 Early Hints
Link: </assets/critical.css>; rel=preload; as=style
Link: </assets/inter.woff2>; rel=preload; as=font; crossorigin
Link: <https://api.example.com>; rel=preconnect
```

## Interactive Labs & Dissections
- [Streaming SSR & Progressive Flushing Lab](https://frontend.rocks/concepts/streaming-ssr-flushing/#lab) ([Markdown](https://frontend.rocks/concepts/streaming-ssr-flushing.md))
- [103 Early Hints Lab](https://frontend.rocks/concepts/early-hints-103/#lab) ([Markdown](https://frontend.rocks/concepts/early-hints-103.md))

## Related Architecture Autopsies
- [Autopsy #06: Anatomy of a Hydration Mismatch & Full Subtree Bailout](https://frontend.rocks/autopsies/hydration-flicker-and-bailout/) ([Markdown](https://frontend.rocks/autopsies/hydration-flicker-and-bailout.md)): SSR page paints instantly, flickers violently when JS boots, and wipes user input in form fields.

## Primary Sources
- https://developer.mozilla.org/en-US/docs/Web/API/Streams_API
- https://html.spec.whatwg.org/multipage/parsing.html
- https://web.dev/articles/rendering-on-the-web
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103
- https://developer.chrome.com/docs/web-platform/early-hints
- https://www.rfc-editor.org/rfc/rfc8297
