Service Worker Not Updating? Fix It in 5 Steps
You deployed, but users still see the old version — your service worker is stuck in the waiting state. Here are the exact five steps to force updates through, verify the new worker is live, and stop it happening again.
Service worker not updating? The new worker is stuck in the waiting state — the browser downloaded your new sw.js but refuses to activate it while the old worker still controls open tabs. The fix: add self.skipWaiting() in the install handler, self.clients.claim() in the activate handler, and bump your cache name. Five steps, all below, no more stale deploys. What a "service worker not updating" looks like The symptoms are maddeningly consistent: You deploy a new build. You reload the page. Nothing changes — the old UI is still there. In Chrome DevTools → Application → Service Workers, you see your new worker listed with the status "waiting to activate" (or a skipWaiting link next to it). The old worker still says "activated and running". On mobile, it's worse: users with the tab pinned can stay on the old version for weeks , because the new worker only activates when every controlled tab closes. In the nastiest variant, the old worker has cached your old index.html , which names your old hashed JS bundles — so the browser keeps serving the dead build forever, and no amount of refreshing escapes it. If you recognize even one of these, this guide fixes it. Why your service worker is not updating Two mechanisms conspire against you. First, the waiting phase is a safety feature, not a bug : a page can only be controlled by one worker at a time, so a new worker waits until no tabs are controlled by the old one. Without intervention, that means "when the user closes all your tabs," which for a PWA user might be never. Second, update detection is conservative. The browser only checks whether sw.js changed (byte-by-byte) on navigation, and at most once every 24 hours. If your server caches sw.js itself, the browser may not even *see* the new file. And if your old worker…