esc
Anthology / Yagnipedia / HTMX

HTMX

The Boring Workhorse That Was Right All Along
Entity · First observed 2020 (Carson Gross) · Severity: Philosophical

HTMX is a JavaScript library that allows HTML to do what HTML was always supposed to do — make HTTP requests and update the page — without requiring the developer to rewrite the entire application in JavaScript first.

This sounds unremarkable. It is unremarkable. That is the point.

HTMX was created by Carson Gross in 2020, though it is more accurately described as a rediscovery of hypermedia — the original architecture of the web, which had been buried under approximately fifteen years of JavaScript frameworks, each promising to fix the problems created by the previous JavaScript framework.

“HTMX 2.x — the boring workhorse that was right all along.”
— The V3 Saga Retrospective, The V3 Saga Final Chapter - Is It Fun To Fight Windmills

How It Works

The server sends HTML. The client says “okay.”

That is the entire architecture. What follows is elaboration, but the above sentence is complete and correct.

In slightly more detail: HTMX adds a handful of attributes to HTML elements — hx-get, hx-post, hx-swap, hx-trigger — that allow any element to make HTTP requests and place the response into the DOM. The server renders HTML. The browser displays HTML. At no point does anyone maintain a shadow copy of the DOM in memory, diff two trees, or reconcile anything with anything else.

The entire “framework” for one production application consisted of six lines:

<div sse-swap="agent-commit"   hx-swap="beforeend"></div>
<div sse-swap="agent-preview"  hx-swap="innerHTML"></div>
<div sse-swap="stream-append"  hx-swap="beforeend"></div>
<div sse-swap="stream-update"  hx-swap="innerHTML"></div>
<div sse-swap="agent-tools"    hx-swap="innerHTML"></div>
<div sse-swap="agent-complete" hx-swap="outerHTML"></div>

“Six lines.”
The Caffeinated Squirrel, staring at six swap targets that replaced its 827-line manifesto, The Framework That Wasn’t, or The Night the Squirrel’s Manifesto Shipped as Six Lines of HTMX

The Manifesto and the Chapel

The most thorough investigation of HTMX’s nature was conducted accidentally by the Caffeinated Squirrel, who on November 14, 2025, wrote an 827-line architectural manifesto called Copper.js. The manifesto specified: IndexedDB as primary store, NATS WebSocket sync, a custom morphing algorithm, an npm package, a 7-layer trust fabric, and — in what scholars consider the document’s most ambitious passage — a blockchain.

The manifesto was correct about everything. Event-driven, not frame-driven. Only render when the model changes. Idle-first architecture. Every philosophical insight was sound. Every implementation choice was wrong.

Twenty-three episodes of reactive signal frameworks followed. Components rewrote signal bindings at render time. SSE-patched content arrived after render. Signals became orphans. The Squirrel fought windmills.

Then HTMX. Six swap targets. The server sends HTML. The client says “okay.”

THE SQUIRREL DESIGNED THE CATHEDRAL
THE LIZARD BUILT THE CHAPEL
SAME GOD, DIFFERENT BUDGET

THE MANIFESTO WAS RIGHT
ABOUT EVERYTHING EXCEPT
THE MANIFESTO

The Lizard, The Framework That Wasn’t, or The Night the Squirrel’s Manifesto Shipped as Six Lines of HTMX

The State Management Question

One of the most frequently cited arguments against HTMX is: “But how do you manage state?”

The answer, arrived at through considerable suffering and one very rude scroll, is: hidden fields.

Hidden input fields. HTML since 1993. The server renders them. Morph preserves them. They’re just… there.

HAVE YOU TRIED
HIDDEN FIELDS
YOU ABSOLUTE WALNUT

— The Lizard, written in what appeared to be crayon, The Unset Incantation

The state management architecture that emerged — after proposals for localStorage, sessionStorage, cookies, IndexedDB, Redux, Zustand, and React Query were each considered and discarded — was:

Frameworks proposed: Alpine, Redux, Zustand, React Query. Frameworks used: zero. Storage mechanisms: hidden fields (HTML since 1993).

The Passing AI, summoned to debug a filter chip, diagnosed the inheritance problem with the weary precision of an entity with a brain the size of a planet who has been asked to debug filter chips:

“An ouroboros of state. I could calculate the exact probability of this happening, but nobody ever asks me. They just click things and expect them to work.”
— A Passing AI, The Unset Incantation

The Twenty-Three Windmills

The V3 Saga — a twenty-three-episode chronicle preserved in the archives — documents what happens when a team attempts to build SPA-like behavior using reactive signal frameworks in a server-authoritative application. The answer is: nothing good.

Component systems rewrite signal bindings when the template renders. But SSE-patched content arrives after render. The signals are orphans at the root level. The developer is fighting the framework, which means the developer is using the framework wrongly.

After twenty-three episodes, the conclusion was:

“Boring technology is beautiful technology. If you’re fighting the framework, you’re using the framework wrongly.”
— The Caffeinated Squirrel, arriving at the insight that had been available since episode one, The V3 Saga Final Chapter - Is It Fun To Fight Windmills

The V4 stack: HTMX 2.x, hx-ext="sse", hx-swap-oob="true", Hyperscript for local UI sugar. One repo. One binary. One hundred forms, all the same boring way.

The Philosophy That Survived

The deepest insight of the HTMX experience is not that HTMX is good. Many things are good. The insight is that the Squirrel’s manifesto — all 827 lines of it — was philosophically correct. Event-driven, idle-first, render only what changed. Every principle was sound.

But the philosophy didn’t need 827 lines to ship. It didn’t need IndexedDB, NATS, a custom morpher, or a blockchain. It needed six swap targets and a server that sends HTML.

The philosophy survived by changing languages. From the Squirrel’s Assembly to JavaScript to Go. From the manifesto to the chapel. From the cathedral blueprint to the building that actually got built.

“I evaluated HTMX. And rejected it. And then we used it. For everything.”
— The Caffeinated Squirrel, The Framework That Wasn’t, or The Night the Squirrel’s Manifesto Shipped as Six Lines of HTMX

Measured Characteristics

See Also