Show HN: htmz – a low power tool for HTML
81–90 of 256 posts
Re: Show HN: htmz – a low power tool for HTML
#82That's a great hack and it shows how close the browser is to offering SPA natively. Just a few attributes and we could avoid the iframe. It's probably more useful to prove a point than an actual day to day tool. And the point seems to be: htmx is too much trouble for what it offers. We just need HTML native ajax.
I'm the creator of htmx and think this is a great library/snippet. Much closer to what htmx-like functionality in HTML would/should look like in that it is following existing norms (iframes, the target attribute) much more closely than htmx. From a practical perspective, a lot of the bulk of htmx is bound up in things like history support, collecting inputs, a lot of callbacks/events to allow people to plug into thin…
Re: Show HN: htmz – a low power tool for HTML
#83That's a great hack and it shows how close the browser is to offering SPA natively. Just a few attributes and we could avoid the iframe. It's probably more useful to prove a point than an actual day to day tool. And the point seems to be: htmx is too much trouble for what it offers. We just need HTML native ajax.
Yes this was a response to htmx. It was a half-parody half-I wanna make it work project. Like https://github.com/vilgacx/aki I would fear if anyone wants to use this in production BUT I would love someone to get inspired and use the concepts rather than the actual code. Hmm maybe i should write a disclaimer...
I solved it by writing a discovery service... a wrapper that's accessible on a public (non-SSL) web page that basically opens a pile of hidden iframes and uses them to war dial local IP addresses until it finds the app and replaces the page's content with the winning frame's. Amazingly this janky thing has held up ;)
Anyway, nice work, and a cool idea!
Re: Show HN: htmz – a low power tool for HTML
#84Given that this uses `target`, doesn't it mean that unlike htmx you can't easily make this gracefully degrade when JS isn't enabled? And, yes, I know, saying "when JS isn't enabled" in 2024 is a bit like saying "when the user is on Mars and has a 10 minute RTT" but forgive me for being an idealist.
> being an idealist Could you describe your ideals for why websites should gracefully degrade without JS enabled? It’s not an unpopular view on HN, but from my perspective as a web developer, JS is a part of browser application just like HTML, and there’s no reason for the website to work if you’ve disabled a part of the browser. I suspect “doesn’t have JavaScript” is being used as a proxy for a lot of other ideals t…
If you just want to consume text, images, audios and videos, follow links and fill in forms (and that's quite a lot and pretty awesome already), you shouldn't need JavaScript.
Re: Show HN: htmz – a low power tool for HTML
#85Earlier quoted context omitted.
I use Disable JavaScript extension with js disabled by default and only enable it if website is broken. https://addons.mozilla.org/en-US/firefox/addon/disable-javas...
You should use uMatrix so you can only enable the scripts necessary to unbreak the site
Re: Show HN: htmz – a low power tool for HTML
#86In 2001 or so, I was building an HTML based email client. We used a hidden iframe to execute JS to load data from the server and manipulate the DOM with the result. It was not quite as neat and elegant as this—the browser support was not there. However, the basic mechanism was the same. It warms my heart to see the basic mechanism in such a compact package, without libraries upon libraries and machinations to make th…
This is the problem with technology. When it works well and really solves the problem, it is invisible. No one gets promoted for invisible.
Re: Show HN: htmz – a low power tool for HTML
#87Given that this uses `target`, doesn't it mean that unlike htmx you can't easily make this gracefully degrade when JS isn't enabled? And, yes, I know, saying "when JS isn't enabled" in 2024 is a bit like saying "when the user is on Mars and has a 10 minute RTT" but forgive me for being an idealist.
With only 181 bytes it could even be included in the page. It's much less than the sum of the meta tags on many sites.
Re: Show HN: htmz – a low power tool for HTML
#88Earlier quoted context omitted.
You should use uMatrix so you can only enable the scripts necessary to unbreak the site
Or uBlock origin (from the same author) which is still maintained