11 ms·
HTMX is just as JS compute heavy. It's not magic.
by robertoandred 2mo ago
HTMX is just as JS compute heavy. It's not magic.
- yawaramin 2mo agoHow is htmx ‘just as JS compute heavy’? It’s doing way less than your average SPA. Have you seen the sizes of the JS bundles of popular SPAs? They make htmx look microscopic in comparison.
- troupo 2mo agoIt's a 14kb library that invents its own templating syntax and DSL and also requires the backend to conform to its DSL. Yes, it's smaller than some other frameworks, but let's stop with "doesn't require JS" nd other bullshit
- jdiaz97 2mo agoyeah if that's a problem you can always use fixi https://github.com/bigskysoftware/fixi https://github.com/bigskysoftware/fixi
- troupo 2mo agoWhat does that have to do with anything? Literally the same thing (only difference is size)
- yawaramin 2mo agoIt doesn’t have its own templating syntax, it just uses server side HTML generation. It doesn’t require the backend to ‘conform’ to anything, it works with very standard HTTP forms and HTML responses. I’m afraid you’re very confused!
- troupo 2mo ago> It doesn’t have its own templating syntax What do you think hx-get and hx-trigger="input changed delay:1s" are? Standard browser attributes? Standard browser functionality and behaviour? Standard events syntax? > It doesn’t require the backend to ‘conform’ to anything, Just one of the quotes from the docs: "You would need to check on the server side for the HX-Request header to differentiate between an htmx-driven and a regular request, to determine exactly what to render to the client." > I’m afraid you’re very confused! I'm afraid I'm not
- tailscaler2026 2mo agoThat's how progressive enhancement works. The website should work fine if JS is disabled. Then it's faster via htmx if JS is enabled, and more so if the backend is tuned as well.
- troupo 2mo agoNone of the things HTMX adds will work. Which is easy to test by just turning off Javascript on most (any?) examples or sites using HTMX. Because none of that is standard, none of that is understood by browsers, and requires HTMX to work. Which is also besides the point of discussing whether or not HTMX invents its own templating, DSL, and requires the server to be aware of HTMX to to work properly.
- zamalek 2mo agoThe things work, albeit with a full page load. As one of the ancestor comments said: progressive enhancement.
- troupo 2mo agoLol. Even the hamburger menu doesn't work on htmx.org without Javascript. I'll let you find any working examples yourself. Most sites won't work or will be broken, too. Obviously You have to actually try and work on progressive enhancement, and not rely on marketing blurbs and promises of magic. I wonder if people blindly defenfing their favorite thingd actually know anything about them.
- yawaramin 2mo agoHamburger menu on the htmx.org site using JavaScript has nothing to do with htmx the framework itself, they’re completely unrelated. It wouldn’t be difficult to make the hamburger menu work without any JS by just using the Popover API, which again is completely unrelated to htmx and can be used by any frontend framework. I assure you I know quite a bit more than you when it comes to htmx and progressive enhancement, having built multiple progressively enhanced htmx apps that work almost exactly the same without JS.
- rolymath 2mo agoYou're saying we need magic for different js frameworks to have different performance profiles?