feat(pwa): auto-update service worker so new releases take effect without manual cache clearing

- app.js: reload once on SW controllerchange (guarded against loops / first
  install) and poll reg.update() hourly for long-open tabs
- sw.js: bump cache to v24 so the new (network-first) worker replaces any stale
  cache-first worker and cleans old caches on activate

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-01 11:24:05 +02:00
parent 661a8ea579
commit 34e701fa78
3 changed files with 18 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
// the entry HTML / version files). New releases take effect on the next
// reload, no manual SW unregister required.
const CACHE_VERSION = 'calendarr-v23';
const CACHE_VERSION = 'calendarr-v24';
const OFFLINE_SHELL = ['/', '/index.html'];
self.addEventListener('install', event => {