# Service Workers Resources

## Knowledge

- [Spec: Service Workers Nightly (W3C)](https://w3c.github.io/ServiceWorker/)
  Normative source for registration, lifecycle, fetch events, clients, and security model. Use for: any claim about how service workers actually work.
- [MDN: Service Worker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
  Browser-facing overview of the API map, lifecycle summary, and interfaces. Use for: orientation before the spec.
- [MDN: Using Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers)
  Practical guide: architecture, registration, basic install/activate/fetch. Use for: first implementation mental model and examples.
- [web.dev Learn PWA: Service workers](https://web.dev/learn/pwa/service-workers)
  Modern orientation: SW as middleware/proxy, registration, scope, lifecycle sketch, lifespan/termination. Use for: lesson-1 “what and when” framing.
- [web.dev: The service worker lifecycle (Jake Archibald)](https://web.dev/articles/service-worker-lifecycle)
  Canonical deep dive: install → waiting → activate, control, `skipWaiting`, `clients.claim`, update dances. Use for: any lifecycle/control decision.
- [web.dev: Service worker registration](https://web.dev/articles/service-workers-registration)
  Registration timing and patterns. Use for: when/how to call `register` without fighting first paint.
- [MDN: ServiceWorkerContainer.register()](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register)
  Interface reference for script URL, `scope`, and options. Use for: scope and secure-context design reviews.
- [MDN: FetchEvent](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent) / [respondWith](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)
  Interception surface. Use for: fetch-policy lessons (navigation vs subresource).
- [web.dev: Offline Cookbook](https://web.dev/articles/offline-cookbook)
  Strategy catalog (cache-first, network-first, SWR, …). Use for: pairing SW fetch handlers with Cache Storage — strategies owned in depth by the Cache API track.
- [web.dev: Service worker + Cache Storage](https://web.dev/articles/service-workers-cache-storage)
  How SW and Cache Storage cooperate. Use for: “warehouse + warehouse manager” mental model.

## Wisdom (Communities)

- [Stack Overflow — [service-worker]](https://stackoverflow.com/questions/tagged/service-worker)
  Real update-lag, scope, caching, and DevTools edge cases. Use for: debugging production-ish failures.
- [r/PWA](https://www.reddit.com/r/PWA/) / [r/webdev](https://www.reddit.com/r/webdev/)
  Architecture tradeoff discussions in product context. Use for: second opinions — treat as anecdotes; verify against MDN/spec.

## Gaps

- Workbox is the common production library layer; this mission stays on platform primitives. If a later lesson needs Workbox, add official Workbox docs as a secondary map over the same lifecycle/fetch model — not a replacement for understanding the primitives.
- Push and Background Sync are awareness-only; no dedicated high-trust path curated yet unless the mission expands.
