Offline storage is application storage
A network response marked no-store can still be placed into a service worker's Cache API by application code. A shared device can then retain private output after the web session changes. Treat that persistence as a product decision, not a performance default.
What to do next
- 01
Audit the fetch handler
Check broad cache-first or stale-while-revalidate rules for authenticated task, result and thumbnail routes. Add explicit exclusions before generic asset matching so a new private route does not accidentally inherit an offline strategy.
- 02
Define the offline boundary
If private offline viewing is required, document which content is stored, under which user identity and for how long. Keep application caches distinct from durable provider storage and avoid claiming logout deletes upstream media.
- 03
Test account transitions
Cache synthetic content as user A, log out and enter as B on the same browser profile. Verify old bytes cannot appear through offline fallbacks, history screens or stale thumbnail requests, including after a service-worker update.
A concrete example
Illustrative example: the app caches its public shell but bypasses Cache API storage for /private-results. After logout, offline mode can show the shell and a sign-in message, without showing the previous user's image preview.
Before you call it ready
- Private routes bypass generic offline rules.
- Logout and account switch are tested.
- Cache API persistence is explicitly reviewed.
When to stop or choose another method
Stop assuming private, no-store alone prevents a service worker from storing a response that your own code explicitly caches.
