Fix: app.js/ui.js/api.js mit APP_VER versioniert + worlds.js Network-First im SW — altes ?v=94 war Ursache für veraltete app.js nach Update (SW by-v779)

This commit is contained in:
rene 2026-05-08 15:47:28 +02:00
parent 5664616a2a
commit af7fe7813e
4 changed files with 10 additions and 9 deletions

View file

@ -3,7 +3,7 @@
Offline-Cache + Push Notifications + Tile-Cache
============================================================ */
const CACHE_VERSION = 'by-v778';
const CACHE_VERSION = 'by-v779';
const CACHE_STATIC = `${CACHE_VERSION}-static`;
const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten
const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache
@ -280,9 +280,10 @@ self.addEventListener('fetch', event => {
return;
}
// CSS, app.js + Seiten-Module: immer Network-First — damit iOS nie veraltete Versionen cached
// CSS, Core-JS + Seiten-Module: immer Network-First — damit iOS nie veraltete Versionen cached
if (url.pathname.startsWith('/css/') || url.pathname.startsWith('/js/pages/')
|| url.pathname === '/js/app.js' || url.pathname === '/js/ui.js' || url.pathname === '/js/api.js') {
|| url.pathname.startsWith('/js/app.js') || url.pathname.startsWith('/js/ui.js')
|| url.pathname.startsWith('/js/api.js') || url.pathname.startsWith('/js/worlds.js')) {
event.respondWith(
fetch(event.request)
.then(response => {