Lesson 0005 · ~10 minutes
One skill: run a 60-second design-review scan — reject bad SW plans fast, and know which DevTools levers unstick “waiting / stale shell.”
Finish 4 quiz cards. You can kill a bad proposal in under a minute (wrong tool, stale forever, update lag, “use SW for CPU”).
| They said… | You say… |
|---|---|
| “Put the filter in a service worker” | Dedicated worker — SW is not a CPU offload |
| “Ship SW on plain http:// prod” | Needs secure context (HTTPS / localhost) |
| “Core checkout only works with SW” | Progressive enhancement — SW optional |
| “SW instead of a CDN for static files” | CDN/HTTP cache first; SW is optional complexity |
Same map as Learn PWA · SW and your Web Workers track comparison.
skipWaiting + UX.
sw-v2.js while
old SW serves old HTML that still registers sw-v1.js.
Keep one URL; change bytes
(lifecycle).
DevTools → Application → Service Workers: installing / waiting / activated, clients list (tools guide.
Dev-only: each navigation refetches SW, installs, skips wait — kills “stuck waiting” while coding.
Button: promote waiting worker to active now.
One load bypasses the SW (spec behavior) — check “is SW the bug?”
Size column “(from ServiceWorker)” vs disk cache vs network — see who answered.
Workbox = library sugar over these primitives (routing, strategies, precache manifests). If you can’t explain install/waiting/respondWith without it, the library will hide bugs — not remove them.
Design review: “We’ll run the multi-second image filter inside the service worker so the UI stays smooth.” Verdict?
Users keep getting last month’s app shell after deploy. install uses
one cache name static forever; activate is empty. Best
root cause?
Dev: new SW sits in “waiting” after every save. Fastest healthy habit?
Suspect the SW is serving a bad response. One-load way to bypass it?
web.dev — Tools and debug (PWA) for DevTools levers. Lifecycle update section if waiting still feels fuzzy.