diff --git a/server/lib.js b/server/lib.js index 330f6de..52a2d52 100644 --- a/server/lib.js +++ b/server/lib.js @@ -2,7 +2,9 @@ const now = () => Date.now(); const json = (res, code, body) => { - res.writeHead(code, { 'Content-Type': 'application/json' }); + // no-store: API/JSON responses (and 404s) must never be cached — a cached 404 for an asset + // like /manifest.json would otherwise persist on a device even after the file is deployed. + res.writeHead(code, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' }); res.end(JSON.stringify(body)); };