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.
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.
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.
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 →
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.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
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.