diff --git a/server.js b/server.js index abbf431..2593535 100644 --- a/server.js +++ b/server.js @@ -177,7 +177,10 @@ function sendFile(res, file) { if (err) { res.writeHead(404, baseHeaders({ 'Content-Type': 'text/plain' })); return res.end('Not found'); } const ext = path.extname(file).toLowerCase(); res.writeHead(200, baseHeaders({ 'Content-Type': MIME[ext] || 'application/octet-stream', - 'Cache-Control': ext === '.html' ? 'no-cache' : 'public, max-age=3600' })); + // HTML is never stored (so a fresh load always gets the current asset + // versions — aggressive in-app wallet browsers were serving stale pages + // that pointed at old, since-fixed JS); versioned assets cache for an hour. + 'Cache-Control': ext === '.html' ? 'no-store, must-revalidate' : 'public, max-age=3600' })); res.end(data); }); }