From 3d1e887c1988e754c966d015f66fdef723627ecd Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:39:40 -0400 Subject: [PATCH] Add cache-busting query strings and no-cache for HTML files Proxy was caching old admin.js; ?v=3 query string forces a fresh fetch. Also extend no-cache header to .html files so future deploys propagate immediately. Co-Authored-By: Claude Sonnet 4.6 --- public/admin.html | 2 +- public/index.html | 4 ++-- server.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/admin.html b/public/admin.html index 55cc6d5..5291a3e 100644 --- a/public/admin.html +++ b/public/admin.html @@ -793,6 +793,6 @@ - + diff --git a/public/index.html b/public/index.html index 929bd51..d8c8d53 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ Homeschool - + @@ -366,6 +366,6 @@ - + diff --git a/server.js b/server.js index def4550..11362b6 100644 --- a/server.js +++ b/server.js @@ -36,7 +36,7 @@ const app = express(); app.use(express.json({ limit: '15mb' })); // photos for page-scanning are base64 in the JSON body app.use(express.static(join(ROOT, 'public'), { setHeaders(res, filePath) { - if (filePath.endsWith('.css') || filePath.endsWith('.js')) { + if (filePath.endsWith('.css') || filePath.endsWith('.js') || filePath.endsWith('.html')) { res.setHeader('Cache-Control', 'no-cache'); } },