SW: app.js/ui.js/api.js auf Network-First — iOS cached nie alte Versionen
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
This commit is contained in:
parent
4353994c68
commit
5ca522780b
2 changed files with 5 additions and 4 deletions
|
|
@ -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 = (() => {
|
||||
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue