← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

Out-of-Order HTML Streaming Moves from JS Frameworks into Browsers

🔄 Updated 2d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Out-of-order HTML streaming is moving into browsers.
  • Chrome 150 ships declarative features for this.
  • Safari and Firefox have indicated support.
  • New <template for> attribute enables declarative streaming.

Browser Integration of HTML Streaming

Out-of-order HTML streaming, a technique that allows web pages to display and become interactive before all content has loaded, is being adopted by web browsers. This pattern, previously managed by JavaScript frameworks, is now moving into native browser functionality.

The proposal involves browsers patching placeholders as data arrives, using either declarative HTML or matching JavaScript APIs. Chrome 150 includes these declarative features, and both Safari and Firefox have expressed support for the initiative.

Declarative Streaming with Template Elements

The declarative proposal introduces out-of-order streaming using the standard <template> element with a new 'for' attribute. Developers can define single insertion points using markers like <?marker name="profile"> or wrap temporary fallback content with <?start name="profile"> and <?end> markers.

When a server streams a matching <template for="profile"> later in the document, the HTML parser identifies it, removes the start/end markers and any fallback content, and inserts the template's contents into the specified DOM position. This allows for dynamic updates to parts of the page as data becomes available.

Preventing Cross-Component Injection

To mitigate cross-component injection attacks, a <template for> element can only patch processing instructions within its immediate parent element. An exception allows templates directly under <body> to have global document scope, enabling updates to elements within the <head> tag or nested structural containers.

Client-Side Scripting Extensions

The initiative also includes a suite of static and streaming DOM insertion methods to extend streaming workflows to client-side scripting. These methods include setHTML, replaceWithHTML, beforeHTML, prependHTML, appendHTML, and afterHTML, along with streaming counterparts like streamHTML and streamAppendHTML. Unsafe variants are also defined for specific use cases.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~26 min · 21 stories · Sep 23

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Out-of-order HTML streaming, which allows web pages to become interactive before fully loading, is being integrated directly into web browsers. This browser-level support, starting with Chrome 150, aims to improve perceived page load performance and user experience by enabling faster content display.