diff --git a/packages/electron/main.mjs b/packages/electron/main.mjs index 9ecbead7..0442f814 100644 --- a/packages/electron/main.mjs +++ b/packages/electron/main.mjs @@ -1240,7 +1240,15 @@ const registerPackagedUiProtocol = () => { if (filePath.endsWith('.html')) { const html = await fsp.readFile(filePath, 'utf8'); const body = injectRuntimeConfigIntoHtml(html); - return new Response(body, { headers: { 'Content-Type': 'text/html; charset=utf-8' } }); + // index.html must never be cached: it names the hashed asset + // bundles, and a cached copy keeps a freshly installed build + // loading the previous version's UI from the renderer disk cache. + return new Response(body, { + headers: { + 'Content-Type': 'text/html; charset=utf-8', + 'Cache-Control': 'no-store', + }, + }); } return electronNet.fetch(pathToFileURL(filePath).toString()); }