← back to Ticket System
ticket-board: send Cache-Control: no-store on board + API responses so the live board never renders a browser-cached stale snapshot
a92170884e7c60172ae12d908aa176be182dfccf · 2026-08-25 11:06:29 -0700 · Steve Abrams
Files touched
Diff
commit a92170884e7c60172ae12d908aa176be182dfccf
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Aug 25 11:06:29 2026 -0700
ticket-board: send Cache-Control: no-store on board + API responses so the live board never renders a browser-cached stale snapshot
---
server.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/server.js b/server.js
index bf306d31..ff076e6b 100644
--- a/server.js
+++ b/server.js
@@ -297,17 +297,17 @@ http.createServer((req, res) => {
if (req.url === '/office' || req.url === '/office.html') {
return fs.readFile(OFFICE_HTML, (e, buf) => {
if (e) { res.writeHead(500); return res.end('office view missing'); }
- res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(buf);
+ res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }); res.end(buf);
});
}
- if (req.url === '/api/running') { return getRunning(d => { res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify(d)); }); }
- if (req.url === '/api/tickets') { res.writeHead(200, { 'Content-Type': 'application/json' }); return res.end(JSON.stringify(withRanking([...tickets().values()]))); }
- if (req.url === '/api/messages') { res.writeHead(200, { 'Content-Type': 'application/json' }); return res.end(JSON.stringify([...messages().values()])); }
- if (req.url === '/kanban') { res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); return res.end(page()); }
+ if (req.url === '/api/running') { return getRunning(d => { res.writeHead(200, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' }); res.end(JSON.stringify(d)); }); }
+ if (req.url === '/api/tickets') { res.writeHead(200, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' }); return res.end(JSON.stringify(withRanking([...tickets().values()]))); }
+ if (req.url === '/api/messages') { res.writeHead(200, { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' }); return res.end(JSON.stringify([...messages().values()])); }
+ if (req.url === '/kanban') { res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }); return res.end(page()); }
// default (/) = the adjustable-columns TABLE view (Steve's list-builds rule, 2026-08-10)
return fs.readFile(BOARD_HTML, (e, buf) => {
- if (e) { res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); return res.end(page()); } // fall back to kanban
- res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' }); res.end(buf);
+ if (e) { res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }); return res.end(page()); } // fall back to kanban
+ res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }); res.end(buf);
});
}).listen(PORT, '127.0.0.1', () => {
console.log('ticket board on :' + PORT);
← 18e23f99 tk: self-title iTerm window (name + durable user.tk) on take
·
back to Ticket System
·
Add brute-force lockout to public ticket board (interim hard 64775fd1 →