#workbox — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #workbox, aggregated by home.social.
-
Regarding local development of apps that have service workers, a simpler fix is to open them in an Incognito / Private Browsing window. That way the SW gets reinstalled and you start fresh. Never have an old SW sitting around ready ruin your day.
https://social.tchncs.de/@teleclimber/111190583948649111
I got this by reading through the #Workbox docs: https://developer.chrome.com/docs/workbox/improving-development-experience/#service-worker-development-aids
-
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
-
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
-
If someone is creating service workers with #Workbox recipes and injectManifest, a build with #esbuild, and doesn't have any issues, I'm interested! 😅
I have a very strange issue:
https://github.com/GoogleChrome/workbox/issues/3207
Bonus points if this is with @eleventy
-
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
-
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 📝😁