fix: bump service worker cache to v1.0.1 to evict stale app shell

Existing PWA installs cache the app shell (app.js et al.) cache-first under
ytplayer-v1.0.0. Without a version bump they'd keep serving the old app.js
that lacked WEB-mode OPFS support, so the offline-cache fix would never reach
already-installed clients. Bumping forces activate → old cache delete →
re-fetch, and triggers the in-app 'Update ready' banner.
This commit is contained in:
Jonathan Sykes
2026-06-30 08:40:23 +08:00
parent 84d6487125
commit f266c4ffb9

View File

@@ -16,7 +16,7 @@
* 5. SW calls skipWaiting() → takes over → client reloads.
* ========================================================================== */
const VERSION = 'v1.0.0'; // ← bump this on every deploy to bust the cache
const VERSION = 'v1.0.1'; // ← bump this on every deploy to bust the cache
const CACHE = 'ytplayer-' + VERSION;
// Files that form the installable app shell.