News for hackers. Stuff that matters.
Re:htmx: Server Sent Event (SSE) Extension by bullen on Saturday January 31, 2026 @08:28AM (#46836498)
What is the advantage over just using this:

  var source = new EventSource('pull?name=one');
  source.onmessage = function (event) {
    document.getElementById('events').innerHTML += event.data;
  };
http://talk.rupy.se/event.html

> If you need bi-directional communication, then you should consider using WebSockets instead.

Or you just do a HTTP request?

Re:htmx: Server Sent Event (SSE) Extension by adontz on Saturday January 31, 2026 @08:35AM (#46836560)
Re:htmx: Server Sent Event (SSE) Extension by anamexis on Saturday January 31, 2026 @10:39AM (#46837574)
Everything HTMX does could be "just" done using JS - this is self-evident. The whole point of HTMX is to enable features like this directly in HTML.
Re:htmx: Server Sent Event (SSE) Extension by infamia on Saturday January 31, 2026 @02:43PM (#46840034)
If you do that you'll reset browser state with whatever you're replacing. For example things like scroll position, if the user opened an accordion, etc. would all be lost.
Re:htmx: Server Sent Event (SSE) Extension by recursivedoubts on Saturday January 31, 2026 @03:03PM (#46840232)
I mean you're not wrong: end of the day htmx is just some javascript written on top of standard vanilla javascript apis. It tries to handle things in a more html-centric, attributes-driven manner than script-oriented approaches do, but it's nothing too complicated

check out fixi for our ultra-minimalist take on the idea:

https://github.com/bigskysoftware/fixi

Or, for extreme minimalisim, htmz, which repurposes iframes for a similar idea:

https://leanrada.com/htmz/