Skip to content
Engineering

Native Out-of-Order HTML Streaming Arrives in Chrome 150

Chrome 150 introduces native out-of-order HTML streaming, shifting this technique from frameworks to the browser. Learn how it impacts web development.

Topic
Engineering
Reading time
5 min
Length
1,068 words
Published
Sep 23, 2026
12:00 am IST
In this article
  1. What Changed?
  2. Why It Matters
  3. Implementing Out-of-Order Streaming
  4. Integrating with Client-Side Scripting
  5. Limitations and Considerations
  6. Evaluating the Impact

The latest update in web development comes from Chrome 150, which introduces native out-of-order HTML streaming capabilities. This new feature allows users to interact with webpage elements before the entire page has fully loaded. While this pattern has been implemented by JavaScript frameworks for years, it's now becoming a browser-native feature, signaling a significant shift in how web pages can be rendered.

What Changed?

Out-of-order HTML streaming is no longer confined to frameworks like React and Next.js. Instead, it has found its way into the browser, specifically with Chrome 150. The proposal allows the browser to handle placeholders and insert content as data arrives, using declarative HTML or JavaScript APIs. This means that developers can now declare insertion points using simple template elements, and the browser will manage the rendering order, updating the DOM as data streams in.

This development is backed by the introduction of a new for attribute in the standard <template> element. For example, developers can use <?marker name="profile"> to declare a placeholder, and then later stream the actual content into the placeholder using a matching template. The mechanism involves the HTML parser matching the identifier, removing the <?start> and <?end> markers along with any intermediate fallback nodes between them, and inserting the template’s contents into that DOM position. This allows for seamless updates to the page's content as data arrives.

Furthermore, the proposal includes processing instructions in templates to allow for multiple updates. These instructions, marked by <?marker> tags, enable incremental content updates without the need to reload the entire page. This is particularly useful for dynamic content that updates frequently, such as live sports scores or stock market data.

Why It Matters

This change is crucial for developers maintaining production codebases. Out-of-order streaming can significantly improve user experience by reducing the time users spend waiting for pages to load. It does so by allowing interactive parts of a page to become functional faster, even if some parts are still loading. This is particularly beneficial for pages with slow-to-compute components that traditionally block rendering.

Moreover, by internalizing these streaming mechanisms into the browser, developers can expect more consistent behavior across different environments. This standardization helps eliminate the discrepancies that might arise when relying on different frameworks to handle streaming. The native implementation also ensures that the performance optimizations are directly supported by the browser engine, potentially reducing the overhead associated with JavaScript-based solutions.

Implementing Out-of-Order Streaming

To implement this feature, developers can start using the new attributes and methods introduced in Chrome 150. Here's a practical example:

<ul id="results">
  <?start name="results">
  Loading…
  <?end>
</ul>

<!-- Streamed later in the HTTP response -->
<template for="results">
  <li>Result One</li>
  <?marker name="results">
</template>

<template for="results">
  <li>Result Two</li>
  <?marker name="results">
</template>

In this example, the placeholder markers are used to insert results into the <ul> as they stream in, allowing the page to display results incrementally rather than waiting for all data to load at once. The browser handles the insertion of results, ensuring that the user sees content as soon as it becomes available.

Developers can take advantage of this feature by structuring their HTML to include placeholder elements where dynamic content will be inserted. By doing so, they can ensure that users receive immediate feedback as new data arrives, enhancing the overall user experience.

Integrating with Client-Side Scripting

Beyond declarative HTML, the specification extends to client-side scripting by introducing several DOM insertion methods. These include setHTML, replaceWithHTML, and their streaming counterparts like streamHTML and streamAppendHTML. These methods provide developers with fine-grained control over how HTML is inserted and updated on the page.

The Fetch API now includes a response.textStream() helper, allowing developers to stream HTML fragments directly into a target container. This is particularly useful for dynamic content that depends on server responses:

const feedContainer = document.querySelector("#feed-container");
const response = await fetch("/api/feed-stream");
await response.textStream().pipeTo(
  feedContainer.streamHTMLUnsafe({ runScripts: false })
);

This code snippet demonstrates how to stream a dynamic HTML fragment into a specified container, making the content available for interaction as it arrives. The use of streamHTMLUnsafe indicates that the operation will not execute scripts, which may be a consideration for security-sensitive applications.

In my experience, when integrating these features with client-side scripting, it's important to start by identifying the parts of the application that would benefit most from incremental updates. Begin by applying streaming to non-critical components, monitoring their performance and impact on user experience. Once comfortable, gradually extend the approach to more central parts of the application.

Limitations and Considerations

While this development offers significant benefits, there are limitations. Security concerns, such as cross-component injection attacks, are addressed by restricting where templates can patch processing instructions. Templates can only modify elements within their immediate parent element unless placed directly under the <body>, where they gain global scope. This restriction ensures that untrusted markup cannot hijack sensitive parts of a document.

Another consideration is browser support. While Chrome 150 leads the charge, Safari and Firefox have only signaled support. It's essential to verify compatibility and test across different browsers to ensure a seamless user experience. Developers should also be aware that while the declarative markup primitives have been incorporated into the WHATWG HTML Living Standard, the companion JavaScript DOM streaming methods are still progressing through a separate standardization process.

Additionally, while this feature enhances the speed and interactivity of web pages, it does not eliminate the need for efficient backend data handling. The server must still be optimized to deliver data in a timely fashion to ensure that the streaming process is effective. This involves ensuring that APIs are performant and that data is sent in smaller, manageable chunks to maximize the benefits of out-of-order streaming.

Evaluating the Impact

The shift of out-of-order HTML streaming into native browser capabilities marks a significant step towards standardized web development practices. This change reduces reliance on framework-specific implementations and promotes more efficient rendering techniques that can enhance the web's responsiveness and interactivity.

For developers working in environments where speed and user interaction are paramount, adopting this new feature could lead to noticeable improvements. As always, ensure thorough testing and consider the security implications when integrating these capabilities into your applications. In my experience, starting with small, non-critical components can help to evaluate the behavior and performance of these new features before a full-scale adoption.

For more on how modern JavaScript frameworks like Next.js handle server components, or to explore new features in Node.js 26.10.0, check out our related articles.

Sources

Out-of-Order HTML Streaming Moves from JS Frameworks into the Browser

Every claim above was checked against this source before publishing. The analysis, the code and the opinions are mine.

Frequently asked

What is out-of-order HTML streaming?

It's a pattern that allows users to interact with parts of a webpage before the entire page has fully loaded, enhancing user experience by improving load times.

Which browsers support native out-of-order HTML streaming?

Chrome 150 supports it with declarative features, while Safari and Firefox have signaled support for the initiative.

How does out-of-order streaming affect page security?

Security is managed by restricting template patching to immediate parent elements, preventing untrusted markup from hijacking sensitive parts of a document.

What are the new methods introduced for DOM manipulation?

New methods like setHTML, replaceWithHTML, and streamHTML allow for more efficient DOM insertion and updates.

Deepak Kumar

Written by

Deepak Kumar

Sr Software Engineer at India Today Group | Aaj Tak · MERN Stack · Generative AI

I build production web applications and Generative AI systems, and I have spent most of nine years on the maintenance end of other people's architectural decisions. I write here about what those systems actually do once real traffic hits them.

Message me