upvote
How does the PWA work offline with HTMX? The “hit the server for fresh markup fragments” approach seems like it has to be abandoned here, however simplifying it is for online apps.
reply
It seems like the wrong tool for the job to me, but I was curious and thought about it a little:

After initial page load, a service worker could intercept all the HTMX app's AJAX requests, but it could only work with what's already cached. Using a lot of tooling like workbox the developer could pre-cache the entire app. (Would that mean no dynamic responses?)

Alternatively, implement the entire HTMX app in JS, build the app once for the NodeJS/Deno backend and once for the front-end. After page load, the frontend could take over.

Or something like that. It's a bit convoluted as PWA solutions often are.

reply
I know that you can have a shortcut on the users phone home screen but I've run into a bunch of problems with that setup where hitting it multiple times opens multiple tabs etc.

Have you found nice workarounds for that?

reply
You have to build a proper PWA with a fully formed manifest.json first off. Web Push (i.e: Push Notifications) are fully supported on both iOS and Android. The Only thing that doesn't work is "background" work (but preactically speaking I haven't really needed it).

If you'd like to find out how I build Mobile-first apps with Go, HTML and HTMX hit me up.

reply
Any chance you could write a hello world repo of this stack and post a link here?
reply
Try asking this question to an LLM. (No, seriously.)

Or to a search engine: https://share.google/dTJmGU38xw0kDSJlZ

reply
Big fan of bDaisy and TW ...all thats missing is jQuery and Razor .cshtml to rock my 2026 mistersoft web stack. HTMX is very cool but $...
reply