Hmm, seems like the 500ing is only when I load the page in an incognito window... it's probably still my #workbox cache in the #serviceWorker, but I'm going to replace the `StaleWhileRevalidate` strategy with `NetworkFirst`. This will mean that the page will have to wait for a network response, but it will maintain my offline support so the #PWA install prompt will still appear. #WebDev
#webdev #pwa #serviceworker #workbox
Who still thinks writing a Service Worker for basic features (performance with cache, offline fallback) is cumbersome?
Using #Workbox recipes make it so easy!
Here's the Service Worker for https://pack11ty.dev 😍
https://github.com/nhoizey/pack11ty/blob/main/src/assets/js/service-worker.js
Is it ok to use Workbox's `injectManifest` with the recent recipes `warmCache` option?
I tried this without success in the Service Worker in Pack11ty:
```javascript
staticResourceCache({
warmCache: self.__WB_MANIFEST,
});
```
Other caches are warmed up, not this one.
Today, nearing release of 1.0, the SvelteKit Docs added an example hand-rolled Service Worker Implementation and also points to Vite Plugin PWA, but I personally prefer to use Workbox Modules myself to not write the low-level bits myself but still own the logic.
Right on time, because I just released my article on how to do it:
Create an offline-first and installable PWA with SvelteKit and workbox-precaching
https://www.sarcevic.dev/offline-first-installable-pwa-sveltekit-workbox-precaching
#offlinefirst #workbox #pwa #svelte
I'm writing a guide on how make a #SvelteKit web app installable, with offline support thanks to the power of #PWA #ServiceWorkers and #Workbox 📝😁
#workbox #serviceworkers #pwa #sveltekit
RT @passle_@twitter.com
🎉 New blog
The year is 2020. Service workers are still rocket science. Humanity still hasn't nailed service worker updates. The search continues.
https://dev.to/thepassle/on-pwa-update-patterns-4fgm
#updates #workbox #progressivewebapp #pwa