diff --git a/backend/static/index.html b/backend/static/index.html
index 15e38e0..93861a4 100644
--- a/backend/static/index.html
+++ b/backend/static/index.html
@@ -224,6 +224,11 @@
navigator.serviceWorker.register('/sw.js')
.catch(err => console.log('SW Registration failed:', err));
});
+ // Wenn ein neuer SW die Kontrolle übernimmt (nach Update),
+ // Seite neu laden — sonst hat app.js neue Seiten-JS aber altes api.js im Speicher.
+ navigator.serviceWorker.addEventListener('controllerchange', () => {
+ window.location.reload();
+ });
}
diff --git a/backend/static/sw.js b/backend/static/sw.js
index 66b5211..e379bfe 100644
--- a/backend/static/sw.js
+++ b/backend/static/sw.js
@@ -3,7 +3,7 @@
Offline-Cache + Push Notifications
============================================================ */
-const CACHE_VERSION = 'by-v23';
+const CACHE_VERSION = 'by-v24';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
// Diese Dateien werden beim Install gecacht (App Shell)