Service Workers & Offline
A programmable proxy between the page and the network: install, activate, fetch, update — plus offline mutation queues and the conflict resolution they imply.
Install, activate, fetch, update — and the waiting worker that quietly leaves users running last week's code for days.
The worker sits between the page and the network and can answer from cache, from the network, or with a response it invents — which is exactly why it can brick your site.
Cache-first, network-first, stale-while-revalidate, cache-only, network-only: five answers, each right for something and each with a characteristic way of going wrong.
Honesty is the whole lesson: say what is available, what is stale, what is queued, and what will happen on reconnect — because a UI that pretends to be online is worse than one that admits it is not.
Change offline, persist locally, reconnect, sync, resolve conflicts — and the last step is a product decision, not a technical default.
What the manifest declares, what makes a site installable, and why an installed app with no offline story is just a bookmark with an icon.