From 3d11acd48bf1f5fc2ae34b1cd578176c4e677ead Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Thu, 16 Apr 2026 16:11:29 -0400 Subject: [PATCH] chore(sw): bump cache version to v9 to purge stale HTML fragments Stale cached HTML fragments referenced old asset hashes (e.g. 404 on canvas-PlYnCtxh.js while server has canvas-R4rXE5Sc.js) after frequent rebuilds. Bumping CACHE_VERSION and the SW registration query string forces the new SW to install and purge all old versioned caches on activate. --- server/shell.ts | 6 +++--- website/sw.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/shell.ts b/server/shell.ts index 7a605906..0b367c31 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -369,7 +369,7 @@ export function renderShell(opts: ShellOptions): string { // Service worker registration + update detection if ("serviceWorker" in navigator && location.hostname !== "localhost") { - navigator.serviceWorker.register("/sw.js?v=8").then((reg) => { + navigator.serviceWorker.register("/sw.js?v=9").then((reg) => { function showUpdateBanner() { if (!isStandalone) return; // Only show update prompt in installed PWA if (sessionStorage.getItem('rspace_update_dismissed')) return; // dismissed this session @@ -2304,7 +2304,7 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string {