intermediate · web
Offline-first web: service workers and PWAs
Service workers without the outage: caching strategies, update flows that never strand a user on an old build, installability and background sync.
·
By Amit Chakraborty — Kolkata, India · Remote worldwide
What you will be able to do
Ship a PWA that installs, works offline, and always shows the latest deploy when online.
Syllabus — 8 chapters
- 1. What a service worker is, and its lifecycle — Follow install, activate and fetch, and know what controls a page.
- 2. Caching strategies — Pick cache-first, network-first or stale-while-revalidate per request type.
- 3. Never cache the HTML shell cache-first — Understand the stale-deploy outage and design it out.
- 4. Workbox and vite-plugin-pwa — Generate a worker from config and precache only fingerprinted assets.
- 5. Update flows — Tell a user a new version exists and swap it in safely.
- 6. Installability and the web app manifest — Meet install criteria and handle the install prompt.
- 7. Background sync and offline queues — Queue writes offline and replay them when the network returns.
- 8. Debugging and killing a bad worker — Recover every user from a broken worker in one deploy.
0 of 8 published. A new chapter every Monday night. Free to read.
Learn it free, elsewhere too
The documentation, videos, books and practice sites worth your time on this subject. All free. None of it is mine.