diff mrjunejune/PWA_SETUP.md @ 273:e02e2036ef84 default tip

add Layer 2 JRPG component system Add reusable content and window modals, an isolated component sandbox, shared cyberpunk scroll areas, production-safe cache freshness, and server-rendered JRPG panel state. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <me@mrjunejune.com>
date Sat, 08 Aug 2026 02:08:08 -0700
parents 9c2eec61a152
children
line wrap: on
line diff
--- a/mrjunejune/PWA_SETUP.md	Fri Aug 07 16:05:29 2026 -0700
+++ b/mrjunejune/PWA_SETUP.md	Sat Aug 08 02:08:08 2026 -0700
@@ -58,7 +58,7 @@
 ✅ **Offline Support** - Caches pages, CSS, JS, fonts, images
 ✅ **App Shortcuts** - Quick access to Blog and Notes
 ✅ **Install Prompt** - Automatic install button
-✅ **Auto-updates** - Service worker updates on reload
+✅ **Auto-updates** - New service workers activate and reload clients automatically
 ✅ **Fast Loading** - Cached resources load instantly
 
 ## Customization
@@ -72,7 +72,13 @@
 Edit `sw.js` to change:
 - `CACHE_VERSION` - Increment to force cache refresh
 - `STATIC_CACHE` - Files to cache immediately
-- Caching strategy (currently: cache-first with network fallback)
+- Caching strategy:
+  - HTML, CSS, JS, JSON, and WASM are network-first with offline cache fallback.
+  - Fonts and images are stale-while-revalidate.
+  - Component sandbox assets always bypass service-worker caching.
+
+Unversioned application code must not use cache-first. That can preserve stale
+production CSS or JavaScript indefinitely when a deployment reuses the same URL.
 
 ## Testing on Mobile