Fix: Force-Update Cooldown + robusteres Cache-Clear, SW by-v1105

Symptom: 'Einen Moment, wir besorgen neue Leckerlis' Loading-Screen
erscheint beim User wiederholt beim Wechsel in andere Bereiche.

Ursachen:
1. In dieser Session wurden viele Bumps in kurzer Zeit ausgerollt
   (1100 → 1104). Jeder Versions-Mismatch zwischen App-Cache und
   Server triggert force-update.
2. /force-update Cache-Delete war fire-and-forget mit nur 1.5s
   Reload-Timer — auf iOS-PWA oft zu kurz für asynchrone unregister/
   caches.delete, daher landete der Reload manchmal noch im alten
   Cache-Stand → erneuter Mismatch → erneuter force-update.

Fixes:
- app.js: Cooldown 5 Min nach force-update — verhindert Loop bei
  mehrfachen schnellen Bumps. Mismatch wird erkannt aber nicht mehr
  sofort reagiert.
- /force-update: async/await für SW-Unregister + Cache-Delete bevor
  Reload. Safety-Timeout 4s. Reload-URL mit ?_t= Cache-Bust.
This commit is contained in:
rene 2026-05-27 07:51:36 +02:00
parent 9a066cb24c
commit b0ae71ba69
6 changed files with 43 additions and 25 deletions

View file

@ -1 +1 @@
1104
1105