# Mission: Service Workers

## Why
As a frontend engineer, you want durable judgment about **service workers** — registration, lifecycle, and network interception — so offline shells, request routing, and PWA-ish network policy are concrete browser mechanics, not “add Workbox and hope.”

## Success looks like
- Given a product requirement, decide service worker yes/no (and when dedicated workers, Cache Storage alone, or server/CDN policy are the better lever)
- Explain what a service worker is and is not: origin-scoped network proxy vs dedicated/shared workers for compute
- Walk registration → install → waiting → activate → controlling without hand-waving (including `skipWaiting` / `clients.claim` tradeoffs)
- Design fetch interception at decision level (navigation vs subresource, `respondWith`, pairing with Cache Storage strategies)
- Spot deal-breakers early (HTTPS/secure context, stale shells, update lag, caching the wrong thing, no DOM / not a CPU offload)
- Defend the choice in a design review with clear constraints

## Status
**Core mission complete** (lessons 1–6 + references). Decision fluency is the bar; optional later depth: hands-on lab, `postMessage` / clients, Workbox as a library map over the same gates.

## Constraints
- Frontend-first: system design decisions and browser APIs, not a full PWA product or production Workbox architecture
- Same shape as Cache API / Web Workers / OPFS: **decision fluency + light hands-on**
- Prefer modern Chromium + Firefox behavior
- Cache Storage method map is largely covered by the Cache API track; this track owns **lifecycle, control, and fetch policy**
- Zero assumed prior Service Worker depth (Cache API + Web Workers tracks complete — use that as comparison, not re-teach)
- No urgent product deadline — optimize for retention and decision quality

## Out of scope
- Full Workbox architecture and library APIs (awareness only: “library layer over these primitives”)
- Deep tracks on Background Sync / Periodic Background Sync / Push (awareness only)
- Building a production offline sync engine or full installable PWA product
- Re-teaching Cache Storage open/put/match or caching strategies as the primary topic (link out to Cache API track)
- Native app offline stacks or non-browser service worker analogs as primary focus
