3 ms·
The article under discussion here appears to be saying that HTMX can work without Javascript enabled. But HTMX itself is a Javascript library, correct? So how c
by pdonis 4y ago
The article under discussion here appears to be saying that HTMX can work without Javascript enabled. But HTMX itself is a Javascript library, correct? So how can it work without Javascript enabled?
- recursivedoubts 4y agothe article says it is possible to build web applications that use htmx for a smoother experience if javascript is enabled, but that properly falls back to vanilla HTML if js is not enabled this is called progressive enhancement[1], and yes, htmx can be used in this manner although it requires some effort by the developer unpoly, another hypermedia-oriented front end library, is more seamless in this regard and worth looking at [1] - https://developer.mozilla.org/en-US/docs/Glossary/Progressive_Enhancement https://developer.mozilla.org/en-US/docs/Glossary/Progressiv...
- elliottinvent 4y agoI think the point is that by using HTMX your site can degrade gracefully for non-JS users. A site for a project of mine [1] is built with HTMX and operates more or less the same for JS and no-JS users. I’m aiming to add some bells and whistles for JS users but the version you see there is more or less the experience non-JS users gets too: 1. https://www.compactdata.org https://www.compactdata.org
- the_gastropod 4y agoH̶T̶M̶X̶ e̶m̶b̶r̶a̶c̶e̶s̶ t̶h̶e̶ i̶d̶e̶a̶ o̶f̶ p̶r̶o̶g̶r̶e̶s̶s̶i̶v̶e̶ e̶n̶h̶a̶n̶c̶e̶m̶e̶n̶t̶ [̶1̶]. Y̶o̶u̶ s̶t̶a̶r̶t̶ w̶i̶t̶h̶ a̶ f̶u̶n̶c̶t̶i̶o̶n̶a̶l̶, j̶a̶v̶a̶s̶c̶r̶i̶p̶t̶-̶f̶r̶e̶e̶, w̶e̶b̶ a̶p̶p̶l̶i̶c̶a̶t̶i̶o̶n̶. H̶T̶M̶X̶ l̶a̶y̶e̶r̶s̶ o̶n̶ t̶o̶p̶ o̶f̶ t̶h̶i̶s̶ t̶o̶ ̶m̶a̶k̶e̶ t̶h̶e̶ e̶x̶p̶e̶r̶i̶e̶n̶c̶e̶ b̶e̶t̶t̶e̶r̶, b̶u̶t̶ i̶t̶'s̶ e̶f̶f̶e̶c̶t̶i̶v̶e̶l̶y̶ o̶p̶t̶i̶o̶n̶a̶l̶. [1] https://developer.mozilla.org/en-US/docs/Glossary/Progressive_Enhancement https://developer.mozilla.org/en-US/docs/Glossary/Progressiv... Whoa... I was very slow apparently
- mixmastamyk 4y agoAdding the form element allows it to post to the server without javascript, just like olden times. Since the htmx header is not included, the backend was instructed to return a full page instead of a fragment.