Skip to main content

Install state (live)

Running as installed app browser tab
Service worker unsupported

On iOS: Share → Add to Home Screen.

Caching contract

"Offline-capable" is scoped honestly: an installable shell with instant repeat loads and a branded /offline fallback — not offline CRUD.

Hashed build assets precached + cache-first — immortal by URL, survives deploys
HTML + __data.json network-only, all routes — offline falls back to /offline
/api/*, SSE, non-GET never intercepted at all (streams must not pass through respondWith)
Query-stringed URLs refused, never normalized — cache-key hygiene (SvelteSpill-class guard)
Sign-out Clear-Site-Data header + explicit worker cache flush

Updates & recovery

No automatic skipWaiting() — updates roll out in two tiers:

Tier 1 — silent a pending update converts the next navigation into a full-page load
Tier 2 — prompt navigation-less sessions get one persistent "Reload" toast after 30 min
Multi-tab controllerchange reloads every open tab together
Kill switch a flag in the worker evacuates all installed clients on the next deploy

Think this pattern could be better? Tell us how.

Leave feedback