January 31, 2026
One-way stream, two-way drama
htmx: Server Sent Event (SSE) Extension
Real-time updates made simple — fans cheer, purists ask “why not vanilla”
TLDR: htmx added a simple way to stream live updates into pages using SSE, a one-way feed that’s easier than chat-style tech. Fans celebrate fewer moving parts, while skeptics say “just use EventSource” or prefer rivals like data-star; others want JSON conveniences, and the feature is headed into the core soon.
htmx just dropped a new way to get live updates into your web pages using Server-Sent Events (SSE) — think a one-way radio from your server directly into your page. It’s lighter than WebSockets (the usual chatty two-way tech) and plugs into HTML with simple attributes. Cue the dev comment section meltdown.
On Team Simplicity, backend folks are loving it. One engineer swooned that “in many cases you don’t need anything beyond htmx”, praising faster builds and easier testing. Others chimed in that this is the “do more with less JavaScript” era, and yes, they brought the “SPAs are shaking” memes. Meanwhile, wild_egg casually dropped a bomb: this streaming support is slated to be built into the next big htmx version. Hype levels: rising.
But the skeptics rolled in hot. One commenter asked, basically, why not just use the browser’s built-in EventSource and write three lines of JavaScript? Another compared it to rival tool data-star, saying it had SSE first and might be “more complete.” And then there’s the spicy wish list: a commenter begged for JSON parsing to pick a specific key before swapping content, knowing full well the purists would pounce.
Bottom line: the feature is simple, the debate is not. One-way stream, two-way drama — and it’s only getting louder.
Key Points
- •htmx released an SSE extension that connects to an EventSource from HTML to update pages in real time.
- •SSE is uni-directional over HTTP and is positioned as a lightweight alternative to WebSockets; use WebSockets for bi-directional needs.
- •The extension replaces the experimental hx-sse attribute and includes a migration path.
- •Configuration attributes include sse-connect, sse-swap, hx-trigger for SSE events, and sse-close to end streams gracefully.
- •Installation options include CDN scripts, direct file inclusion, or npm with bundlers like Webpack or Rollup; usage involves hx-ext="sse" and named event handling.