DWEP technical update
I've been working on the DWEP app, and have just reviewed the service-worker.js
file, which is central to PWAs
I decided to use a cache first caching/fetching strategy, with a versioned cache, and with some calls (in the install and activate event handlers) to ensure that the latest version of the service worker itself (and therefore cached resources since the cache version number is located in the service worker file) is used as soon as possible
https://codeberg.org/tord/dwep/src/branch/main/service-worker.js
It seems to be the best option and i don't really see any downside to it. The only thing is that i have to update the cache version every time i make an update to the app
#dwep #CacheStrategy #cache #caching #WebDevelopment #PWA #javascript #programming