← Chrome 148 reference

v148 · html · enabled by default

Out of order streaming

Lets a server update any named region of a streamed HTML document without JavaScript — using processing instruction range markers (<?start id?> / <?end id?>) and <template for="id"> elements that replace matched regions as they arrive in the stream.

at a glance

Shipped inChrome 148
StatusEnabled by default
FlagNone
Standards positionSafari: Support  ·  Firefox: No signal
Specwhatwg/html PR #11818 (Working draft)
Blink componentBlink>HTML
ChromeStatus5111042975465472 — Out of order streaming

why it exists

Classic HTTP streaming delivers content top-to-bottom. If a slow database query powers a section at the top of the page, everything below waits. Today, fixing this requires either JavaScript (e.g. fetch + innerHTML) or multiple round-trips. Out of order streaming is a declarative, zero-JS solution: the server streams a placeholder, continues with fast content below, then later streams a <template for="id"> that the browser uses to replace the placeholder — no script involved.

Source: chromestatus summary + whatwg/html PR #11818.

how it works

1. Mark a region with PI range markers

The server emits processing instructions to delimit the region that should be replaced later. These require the Parse processing instructions in HTML feature (also v148).

<!-- Server streams this first -->
<main>
  <?start slow-section?>
  <p>Loading…</p>
  <?end slow-section?>

  <p>Fast content rendered immediately.</p>
</main>

2. Stream a replacement template later

When the slow data is ready, the server writes a <template for="slow-section">. The browser replaces the marked region's content with the template's content in-place — no layout disruption, no JS required.

<!-- Server streams this after the slow query completes -->
<template for="slow-section">
  <article>
    <h2>Top result: Gadget X</h2>
    <p>Price: $49 — In stock</p>
  </article>
</template>

Result

The user sees "Loading…" for the slow section, while fast content below renders immediately. When the template arrives, the placeholder is replaced without a repaint of unrelated content.

key primitives

<?start id?>Processing instruction that opens a named streaming region.
<?end id?>Processing instruction that closes the named region.
<template for="id">HTML element whose content replaces the matched region when the parser sees it. The for attribute references the region id.
Source: whatwg/html PR #11818. Syntax may change before the spec is merged.

browser support

Chrome148 (desktop)
Edge148 (Chromium)
FirefoxNo signal
SafariSupport (date TBD)
Source: chromestatus browser views at time of generation.

see also