From 0394fc8399ccb3951302197a7fdc176b3358ea16 Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Mon, 2 Mar 2026 21:24:38 +0100 Subject: [PATCH] fix: add Cache-Control: no-store to dashboard HTML/JSON responses Browser was caching HTMX partial responses, causing stale data on page refresh. The deployment panel and other sections would show old values until the 10-minute HTMX poll cycle caught up. Co-Authored-By: Claude Opus 4.6 --- src/dashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashboard.js b/src/dashboard.js index 1f8e14d..91ddb3d 100644 --- a/src/dashboard.js +++ b/src/dashboard.js @@ -1272,8 +1272,8 @@ function renderDashboardPage() { } // ── Request handler ────────────────────────────────────────────────── -function sendHtml(res, s, html) { res.writeHead(s, {'Content-Type':'text/html; charset=utf-8'}); res.end(html); } -function sendJson(res, s, obj) { res.writeHead(s, {'Content-Type':'application/json'}); res.end(JSON.stringify(obj)); } +function sendHtml(res, s, html) { res.writeHead(s, {'Content-Type':'text/html; charset=utf-8','Cache-Control':'no-store'}); res.end(html); } +function sendJson(res, s, obj) { res.writeHead(s, {'Content-Type':'application/json','Cache-Control':'no-store'}); res.end(JSON.stringify(obj)); } function readBody(req) { return new Promise((resolve, reject) => { let data = '';