Part IV β The Reach
9 Offline Support
GoalMake the app usable when the network isn't, and sync cleanly when it returns.
- 9.1 Service Workers A background script that survives your page, proxies its requests, and updates on its own schedule.
- 9.2 Progressive Web Applications (PWAs) A website that installs, launches from the home screen, works offline, and receives push.
- 9.3 Offline Writes & the Sync Queue Write locally first, queue every change, and replay the queue so the server applies each change exactly once.
- 9.4 Conflict Resolution Two offline edits to the same thing will collide β choose the rule before it happens, per field, not per app.
- 9.5 Background Sync & Storage Limits The browser decides when your queue runs and how long your data lives β design for both.
Capstone
Design an offline-first note app: cache strategy, write queue, sync watermark, and the conflict rule you'd defend.