From 5ca522780bdc16f7ed4f958f8ca1a26f8ab13ad9 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 26 Apr 2026 08:56:10 +0200 Subject: [PATCH] =?UTF-8?q?SW:=20app.js/ui.js/api.js=20auf=20Network-First?= =?UTF-8?q?=20=E2=80=94=20iOS=20cached=20nie=20alte=20Versionen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cache-First für app.js führte dazu dass iOS im normalen Safari-Tab den alten APP_VER servierte → alte Seiten-Skripte wurden geladen. Alle Kern-JS-Dateien sind jetzt Network-First wie CSS und Seiten-Module. SW by-v413, APP_VER 392 --- backend/static/js/app.js | 2 +- backend/static/sw.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/static/js/app.js b/backend/static/js/app.js index f74e65e..589e18e 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '391'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '392'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const App = (() => { diff --git a/backend/static/sw.js b/backend/static/sw.js index 9d7983e..64a26c8 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v412'; +const CACHE_VERSION = 'by-v413'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten @@ -82,8 +82,9 @@ self.addEventListener('fetch', event => { return; } - // CSS + Seiten-Module: immer Network-First — damit iOS nie veraltete CSS cached - if (url.pathname.startsWith('/css/') || url.pathname.startsWith('/js/pages/')) { + // CSS, app.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') { event.respondWith( fetch(event.request) .then(response => {