I want to keep my web application available offline.
The state, I’ll manage (I’ll use localStorage or IndexDB, or an abstraction such as tinybase or Dexiejs for this)
But if I turn off my wifi to test offline-functionality, I just want the web application to be cached so that a user can continue creating.
Ducknote seems to be doing this well. https://www.ducknote.app/
I think most people would point to PWA, but:
- PWA tries more than what I want. I don’t need the app installable on android, dont need notifications or other native functionality, I just want to have my web application run well on mobile and on desktop, both online and offline.
- PWA seem to run out of fashion. If the answer still is: use PWA, where should I get started? I tried looking into Workbox but I just don’t understand the docs whatsoever. https://developer.chrome.com/docs/workbox
So my question is: How do I make sure my app still runs when you’re temporarily offline?
- If PWA is your answer, which resource(s) should I start with
- If there is a simple working example of using a service worker for offline application caching, where is it?
(Bonus if there are examples with React / Next, since I’m working with that)