Service workers sit between your page and the network as a programmable proxy, running on their own thread with no DOM access and no window. They can wake up when no tab is open, intercept every request under their scope, and serve content from a cache you control — which is exactly why a deploy can appear to do nothing at all. This episode walks through the full lifecycle: download, install, activate, and the "waiting" state that explains why refreshing a page never picks up a new version. Along the way: why AppCache had to die, what clients.claim and skipWaiting actually trade away, the 24-hour update check window, and the clone-the-stream footgun that turns a five-minute mistake into a four-hour debugging session. We also cover cache-first vs network-first vs stale-while-revalidate, navigation preload, Background Sync, and how push notifications wake a worker on a device that has no tab open.
Key sources:
• MDN — https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
• MDN — https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers
• MDN — https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/Offline_and_background_operation
Episode 5942 — myweirdprompts.com/n/5942 (permanent short link: myweirdprompts.com/899830)