Fix: Sidebar via JS-Inline-Styles (SW-Cache-unabhängig) + SW force-navigate
_openSidebar() setzt nun direkt style.cssText statt CSS-Klassen, damit stale CSS-Cache keinen Einfluss hat. SW by-v30 → by-v31 mit clients.navigate() im activate-Handler für automatischen Reload.
This commit is contained in:
parent
40b802ae86
commit
b6fae96334
2 changed files with 22 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Offline-Cache + Push Notifications
|
||||
============================================================ */
|
||||
|
||||
const CACHE_VERSION = 'by-v30';
|
||||
const CACHE_VERSION = 'by-v31';
|
||||
const CACHE_STATIC = `${CACHE_VERSION}-static`;
|
||||
|
||||
// Diese Dateien werden beim Install gecacht (App Shell)
|
||||
|
|
@ -40,6 +40,9 @@ self.addEventListener('activate', event => {
|
|||
keys.filter(k => k !== CACHE_STATIC).map(k => caches.delete(k))
|
||||
))
|
||||
.then(() => self.clients.claim())
|
||||
// Alle offenen Fenster neu laden, damit neues CSS/JS aktiv wird
|
||||
.then(() => self.clients.matchAll({ type: 'window' }))
|
||||
.then(clients => clients.forEach(c => c.navigate(c.url)))
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue