cd /news/developer-tools/one-ui-many-back-ends-out-of-order-h… Β· home β€Ί topics β€Ί developer-tools β€Ί article
[ARTICLE Β· art-179114] src=gist.github.com β†— pub= topic=developer-tools verified=true sentiment=↑ positive

One UI, Many Back-Ends: Out-of-Order HTML Streaming in AutoCSS

A developer built AutoCSS, a presentation-layer architecture that keeps HTML, CSS, and JavaScript strictly separated so a single standards-compliant UI can render data from many different back-ends. The approach relies on out-of-order HTML streaming via named markers and <template for> patches, letting the browser place streamed HTML without JavaScript; in headless Chrome 158 testing, patching filled an AutoCSS-shaped page through load, view switch, and back while cutting data-mapping JavaScript by about 87%. The feature has shipped only in Chrome/Edge 150 (with streaming setters in 157), while Firefox and Safari have yet to implement it.

key takeaway

Using declarative <template for> patches with named start/end markers lets the browser place streamed HTML out of order without JavaScript, cutting data-mapping JS by about 87% in a headless Chrome 158 test.

by read5 min views2 publishedDec 1, 2026

Nov 30, 2026 Β· @D7460N

AutoCSS keeps the presentation layer air-gapped from the data layer, so one modern, secure, fully W3C/WCAG Standards and 508 A11Y compliant UI can render and adapt to, and control many various back-ends.

Out-of-order HTML streaming lets the browser itself place delivered HTML into that UI, which moves more of the UI to one security approved CDN-served source.

AutoCSS canon states the aim: "not one project's UI but every project's at once β€” one presentation layer, served once, called remotely to render any back-end's data by that data's presence and shape alone" (AGENTS.md Β§1).

Layer Owns Never holds
HTML Semantic and HTML5 custom elements: structure only Classes, ids, data-* , CSS, JS
CSS Look/feel, state, visibility by data presence ( :not(:empty); ,:has()``; , container and style queries, light-dark()``; ) Data, JS
JS Data transport (CRUD) through one oninput Presentation, HTML
Data (JSON today) Values only HTML, styling hints

Because CSS reacts live in real-time to whatever arrives, the UI does not need to know which back-end sent it. That is the "one UI for many back-ends" goal.

Patching lets HTML arrive in any order and land in named spots in the page; the browser does the placing, not JS (article, Chrome blog).

<h1><?start name="h1">…<?end></h1>

<template for="h1">Home</template>
Part What it does Shipped
<?start name> …<?end> ,<?marker name> Named spots (processing instructions, formerly parsed as comments) Chrome/Edge 150 ( webstatus )
<template for="name"> Replaces the named spot with its content; no JS Chrome/Edge 150
<template for="name" src="url"> Fetches the content from a URL; no JS Experimental flag only
streamAppendHTMLUnsafe() and other streaming setters JS streams fetched HTML; its <template for> patches apply Chrome/Edge 157 ( webstatus )

A patch can carry new markers, so the same spot can be filled again. The article's single-page demo uses that to swap page content on each navigation (live demo). The safe streamAppendHTML() drops the templates, so the demo uses the Unsafe variant.

Firefox and Safari have not shipped it. WebKit's position is "support" (#628) and Mozilla's is "positive" (#1369). An earlier no-JS approach used Declarative Shadow DOM and <slot> (lamplightdev); AutoCSS bans both.

The CDN would carry everything shared, shell and CSS; each back-end would send only content, which the browser places and CSS reveals.

[embedded content: AutoCSS delivery map Β· CDN, back-ends, 4 page steps]

Steps 1 to 4 run the same way on every site; only the content in step 3 differs per back-end. The CDN shell is a ruling; the generator's location is open.

In headless Chrome 158, patching filled an AutoCSS-shaped page through load, view switch and back, and cut the data-mapping JS by about 87%.

Test Result
<template for> fills a named spot βœ… No JS; markers and template removed after
:empty on an element holding only markers βœ… True, so the CSS logic is unchanged
Patch placed inside the <template> pool ❌ Never applies; template content is inert
<template for src> ⚠️ Flag only; normal Chrome ignores src and wipes the placeholder
One patch file fills many spots βœ… Limited to the target's container; a patch aimed at header frommain was blocked
View switch: load, switch, back βœ… Lists went 5 β†’ 2 β†’ 5 items; nav radios inside labels survived
One spot takes a different layout per view βœ… p +p +ul ↔figure +p ,index.html unchanged
Outer shell from another origin (CORS) βœ… Flag on: no JS, rendered with JS off. Normal Chrome: JS fallback
JSON as a patch source ❌ Never mapped; rejected or dumped as raw text
Data-mapping JS in the reference app 3 files, 3,631 bytes β†’ 1 file, 458 bytes
contentEditable on a filled spot βœ… Markers survived editing

The method works today only in Chrome and Edge, and its data must be HTML, not JSON.

Area Finding Status
Browsers Chrome/Edge only; <template for src> still behind a flag Waiting on Firefox, Safari and the src launch
Data format Patch files are HTML. JSON needs JS or a generator outside the page; the canon (Β§6) says data is JSON Open ruling
Security Unsafe without a sanitizer ran anonerror handler and let a<style> restyle the page. An allowlist Sanitizer stripped both but kept ajavascript: link. A CDN shell<script> ran on thesrc path Allowlist sanitizer + CSP; shell file holds no <script>
Attributes src /alt cannot be patched onto existing elements; the data carries the whole<img> Open
Frameworks JSX errors on markers; Vue errors and drops them; Angular drops them silently. AutoCSS CSS is unaffected Framework apps keep their own data binding
Failure A failed CDN fetch left a blank page Pin with integrity , render-block with<link rel="expect"> (untested)
Fallback cost A conditional import() keeps fallback code off supporting browsers, but hook J3 blocks it Open ruling

Two rulings are recorded (Nov 30, 2026); the matching canon edits are drafted but not committed.

── more in #developer-tools 4 stories Β· sorted by recency
── more on @autocss 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/one-ui-many-back-end…] indexed:0 read:5min 2026-12-01 Β· β€”