How Do Service Workers Even?
summary
Service workers run as background JS threads that proxy every fetch to enable offline-first caching, faster loads and push; Google’s Workbox is recommended for precaching and versioned caches. Real failures: a site cached redirected HTML as plain text and stayed broken until caches were cleared; another deploy failed to install because a redirected asset retried until the browser aborted, leaving old static assets live. Key facts: service workers persist across restarts, caches don’t auto-expire, updates can take up to 24 hours unless you use clients.claim or devtools bypasses.
AI-written summary · about
chapters (40)
- 0:00Intro
- 0:32Bad Jokes
- 1:02Follow Along Slides
- 2:09Performance
- 2:35Push Notifications
- 3:13What Are Service Workers
- 3:34Service Worker Limitations
- 3:54On Device Network Proxy
- 4:29Service Worker Schematic
- 5:07Service Worker Async
- 6:13Multiple Service Workers
- 6:44Single Service Worker
- 6:58Persistent Service Workers
- 7:38Service Worker Life Cycle
- 8:44Service Worker Registration
- 9:59Assault
- 11:40Workbox
- 12:42Page
- 14:38Claiming Control
- 15:42Service Worker Lifecycle
- 16:27Idle Phase
- 17:24Check Cache
- 17:54Network fallback
- 18:58Caching strategies
- 20:14Updating service workers
- 22:08Deploying new service workers
- 23:21Downloading a new service worker
- 24:19Managing your open pages
- 24:36Breaking things
- 24:59Testing JavaScript
- 26:31The Problem
- 31:23The Other Option
- 35:45The Takeaway
- 37:01A Gotcha
- 37:21Update Personal Site
- 39:42Cache Control headers
- 40:26Takeaway
- 41:03Halloween
- 41:35Bendy Works
- 41:53Resources
related talks
23mGo Offline with Service Workers
27mMaking Offline Suck Less with Service Workers
35mTame your service worker [...]
17mService Worker and the Appification of the Web
30mThe Beauty of Service Workers
30mBuilding Faster, More Resilient Apps with Service Worker: A Caching Strategy Deep Dive
32mThe ServiceWorker is coming, look busy
27mAnd Now You Understand Service Workers
