Rollback alla 3.0.0 (24391c4)

Ripristinato per intero lo stato del commit 24391c4, che sull'iPhone
con l'icona installata si vedeva correttamente. Le modifiche dei commit
successivi restano nella storia per essere riprese una per volta.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
alexspeakerandClaude Fable 5.1 committed 2026-11-06 16:08:48 +01:00
1 parent c9fecb068b
commit ffb04a96a7
8 files changed
+12 -188

No files matched your search

+1 -22
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = 'rpigroupplay-v10';
const CACHE_NAME = 'rpigroupplay-v5';
const ASSETS = [
'./',
'./index.php',
@@ -75,27 +75,6 @@ self.addEventListener('fetch', (e) => {
const isStatic = STATIC_RE.test(new URL(url).pathname);
const matchOptions = isStatic ? { ignoreSearch: true } : undefined;
// Pagine (guscio dell'app e contenuti PHP): prima la rete, la cache solo se la rete manca.
// Così dopo un aggiornamento nessuno resta con il guscio vecchio e gli script nuovi.
if (!isStatic) {
e.respondWith(
fetch(e.request).then((response) => {
if (response.status === 200) {
const responseClone = response.clone();
caches.open(CACHE_NAME).then((cache) => cache.put(e.request, responseClone));
}
return response;
}).catch(() => {
return caches.match(e.request).then((cached) => {
if (cached) return cached;
if (e.request.mode === 'navigate') return caches.match('./index.php');
});
})
);
return;
}
// File statici (css, js, font, immagini): subito dalla cache, aggiornati in sottofondo
e.respondWith(
caches.match(e.request, matchOptions).then((cachedResponse) => {
if (cachedResponse) {