From dce608ae1b675cfe13e6e4264fddb9933396c8a6 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 25 Mar 2026 18:02:14 -0700 Subject: [PATCH] fix: cache-bust sw.js registration + no-cache header for SW/manifest - Add ?v=4 to all SW registration URLs to bypass stale CF CDN cache - Set Cache-Control: no-cache for sw.js and manifest.json so future SW updates are never blocked by CDN caching Co-Authored-By: Claude Opus 4.6 --- server/shell.ts | 6 +++--- website/canvas.html | 2 +- website/create-space.html | 2 +- website/index.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/shell.ts b/server/shell.ts index c3e5a02..c2457dc 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -278,7 +278,7 @@ export function renderShell(opts: ShellOptions): string { import '/shell.js'; // ── Service worker registration ── if ("serviceWorker" in navigator && location.hostname !== "localhost") { - navigator.serviceWorker.register("/sw.js").catch(() => {}); + navigator.serviceWorker.register("/sw.js?v=4").catch(() => {}); } // ── Install prompt capture ── window.addEventListener("beforeinstallprompt", (e) => { @@ -2113,7 +2113,7 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string {