From 437901b8e226f586a133cf96ec9e09f3898444b8 Mon Sep 17 00:00:00 2001 From: rene Date: Tue, 12 May 2026 19:40:50 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Update-Loop=20=E2=80=94=20index.html=20S?= =?UTF-8?q?cript-Tags=20auf=20APP=5FVER=20synchronisiert=20(SW=20by-v889)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: ?v=885 in Script-Tags → Browser cached app.js immutable für 1 Jahr. Nach force-update (löscht nur SW-Cache, nicht Browser-HTTP-Cache) lädt Browser alte app.js mit APP_VER=885 → X-App-Version: 889 Mismatch → Endlosschleife. Ab jetzt: ?v= in index.html IMMER mit APP_VER synchron halten. --- backend/main.py | 2 +- backend/static/index.html | 8 ++++---- backend/static/js/app.js | 2 +- backend/static/sw.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/main.py b/backend/main.py index f3955d6..5e78c9a 100644 --- a/backend/main.py +++ b/backend/main.py @@ -406,7 +406,7 @@ async def serve_media(path: str, request: _Request): raise _HE(404, "Nicht gefunden.") return _media_response(filepath) -APP_VER = "888" # muss mit APP_VER in app.js übereinstimmen +APP_VER = "889" # muss mit APP_VER in app.js übereinstimmen @app.get("/.well-known/assetlinks.json") async def assetlinks(): diff --git a/backend/static/index.html b/backend/static/index.html index 2cbf257..0fd8c6e 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -583,10 +583,10 @@ - - - - + + + + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index cae6c71..0c24103 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 = '888'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '889'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.5.1'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; // Cache-Bust-Parameter nach Update-Reload sofort entfernen diff --git a/backend/static/sw.js b/backend/static/sw.js index 06d0d08..1941d2a 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-v888'; +const CACHE_VERSION = 'by-v889'; 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