InfoQBruno Couriol2 min readintermediate
Out-of-Order HTML Streaming Moves from JS Frameworks into the Browser
Summary
The WICG declarative partial updates proposal adds `<template for>` and processing‑instruction markers to enable out‑of‑order HTML streaming directly in the browser. Chrome 150 ships the markup support; streaming DOM APIs (e.g., `streamHTMLUnsafe`) and `Response.textStream()` let servers push fragments that replace placeholders without blocking the rest of the page. Security is enforced by limiti…
- New `<template for>` attribute pairs with `<?marker?>`/`<?start?>…` processing instructions to define insertion points for streamed fragments.
- Browser‑side streaming APIs (`streamHTML`, `streamAppendHTML`, etc.) accept a `WritableStream` and can be used with `Response.textStream()` for incremental rendering.
- Security model: templates may only replace markers within their direct parent element, except when placed under `<body>` which grants document‑wide scope.
- Chrome/Edge 150+ already implement the markup; Chrome 151 adds `textStream()`. Safari and Firefox have signaled intent to support.
Out‑of‑order streaming cuts perceived latency by letting interactive parts of a page render before slow components finish, improving user experience without requiring framework‑specific runtime code. Native support also centralizes security checks and reduces JavaScript payloads.
6/10





