by robertoandred · 3y ago · 0 comments
With some constraints you can create a page that works with or without JS. The same endpoint can be used for serving HTML fragments for HTMX and full page for JS-disabled clients since the HTMX request can be detected by the HX-Request header.
Didn't that used to be called AJAX or REST or something?
https://enmascript.com/articles/2019/09/26/toggle-content-on...
I don’t like messing with the URL to achieve this, so unless using the “details” element, maybe JavaScript is actually the best approach…
https://htmx.org/essays/hypermedia-friendly-scripting
In general, I'd recommend perusing the essays to get a flavor of the style of web application we are advocating for:
And, if you want more, taking a look at our book: