Re:How to make a web app work offline
by Gravyness on Sunday March 08, 2020 @08:04AM
(#22517609)
Felt a little lacking some research on options, and manifest configuration is quite a topic on its on, but otherwise an informative post about all the steps required to build an offline app in todays technology.
There are a few options for the frontend such as Angular/React or even webpack with other libraries to help with the offline caching, dealing with or programming service workers is pointless as they don't really provide any other benefit besides caching.
I ended up implementing a syncronization layer myself, which was challenging in a fun way, but I wouldn't use IndexedDB API, it feels much like WebGL interface: overly verbose, stateful, and the specification does not mind web developers at all. For those and other reasons I recommend [Dexie.js](https://dexie.org/) to handle the local DB.
Re:How to make a web app work offline
by Pigo on Monday March 09, 2020 @11:08AM
(#22525981)
Dexie is great, but it's a good idea to understand the lower level before you start leveraging the wrapper for it. I jumped into Tone.js before understanding the Web Audio API, and I eventually regretted it.
There are a few options for the frontend such as Angular/React or even webpack with other libraries to help with the offline caching, dealing with or programming service workers is pointless as they don't really provide any other benefit besides caching.
I ended up implementing a syncronization layer myself, which was challenging in a fun way, but I wouldn't use IndexedDB API, it feels much like WebGL interface: overly verbose, stateful, and the specification does not mind web developers at all. For those and other reasons I recommend [Dexie.js](https://dexie.org/) to handle the local DB.