Ship a PWA update without breaking offline users
A conservative update strategy for caches, service workers, saved data, installation, and recovery.
Keep app data outside release caches
The service worker may replace interface files, but it must not erase project records. Use namespaced caches and delete only caches owned by the current application. Never treat a broad origin-wide cache cleanup as a harmless update.
Do not replace a good offline copy with an error
When the network returns an error or times out, preserve the last known working shell. Configuration and authentication responses should use online-only or no-store behavior where stale data would create an unsafe state.
Make activation visible
Let the user know when an update is ready and allow current work to be saved before activation. Installed applications may require a full close and reopen, so the message should explain the exact recovery action.
Test both new and returning users
A clean install proves only the new-user path. Also test an older cached version with saved data, upgrade it, restart it offline, and compare the stored content before and after.
Release-ready checklist
- Caches are scoped to this app
- Errors do not overwrite a good offline copy
- Configuration is not served stale
- The user controls update activation
- Saved data survives an update test
This guide is written for planning and verification. Store rules and legal requirements can change; verify official requirements before submission.