Pwa Service Worker

Make a web app work offline and install cleanly, with a way out when its service worker goes wrong: ship the rescue first, a no-op worker at the same URL that clears caches and unregisters itself; pick a strategy per resource class (precache the hashed shell, stale-while-revalidate for tolerant reads, network-only for writes); name caches by build and delete old ones on activate; show a waiting worker as an update prompt, not a blind skipWaiting; queue offline writes with idempotency keys. Use when someone asks to "make it work offline" or "turn this into a PWA", or reports "users stuck on an old version" or "the service worker serves stale files". Not for server-side data caching (application-caching), chunk errors in old tabs with no worker involved (deploy-version-skew), back-button reloads (bfcache-eligibility), or a native store release (mobile-release).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit c0152f6784

Frequently asked questions

npx get-skill add greenblacked/pwa-service-worker