fix: version 2.18.3 -- F5 normal ya no muestra la version anterior tras actualizar

El service worker servia index.html desde su precache en cada navegacion.
Navegaciones pasan a NetworkFirst (cache solo offline), serve.json agrega
no-cache a html/sw.js e immutable a /assets, y se chequean actualizaciones
del SW cada 30 min y al volver a la pestaña.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Milton Gonzalez
2026-10-21 08:34:18 -05:00
parent bcb9c9d714
commit 22071b344a
7 changed files with 52 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
{
"headers": [
{
"source": "**/*.@(html|webmanifest)",
"headers": [{ "key": "Cache-Control", "value": "no-cache" }]
},
{
"source": "@(sw.js|registerSW.js|workbox-*.js)",
"headers": [{ "key": "Cache-Control", "value": "no-cache" }]
},
{
"source": "assets/**",
"headers": [{ "key": "Cache-Control", "value": "public, max-age=31536000, immutable" }]
}
]
}