[PR #355] [CLOSED] serve: send Cache-Control: no-cache for index.html #2593

Closed
opened 2026-11-04 02:01:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/355
Author: @dan64
Created: 10/1/2026
Status: ❌ Closed

Base: main ← Head: fix/index-html-no-cache


📝 Commits (1)

  • 1f16775 serve: send Cache-Control: no-cache for index.html

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 serve/server.py (+1 -0)

📄 Description

Summary

  • /web/* static assets (app.js, app.css, sprite.svg) already send Cache-Control: no-cache, but the root index.html response didn't set any cache header at all.
  • Without it, the browser falls back to its own heuristic caching, so after an engine restart the page can keep showing a stale shell until the user hard-refreshes (Ctrl+F5) - even though app.js/app.css underneath were already being fetched fresh.
  • One-line fix: give index.html the same no-cache treatment its own assets already have.

Test plan

  • python -m py_compile serve/server.py
  • Manual: start the server, load the page, restart the server, reload without a hard refresh - page should reflect the current index.html without needing Ctrl+F5.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/355 **Author:** [@dan64](https://github.com/dan64) **Created:** 10/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/index-html-no-cache` --- ### 📝 Commits (1) - [`1f16775`](https://github.com/Niko1221/Strata/commit/1f167759e9a6f32e5d0ca2091b97b2f70b68da98) serve: send Cache-Control: no-cache for index.html ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+1 -0) </details> ### 📄 Description ## Summary - `/web/*` static assets (`app.js`, `app.css`, `sprite.svg`) already send `Cache-Control: no-cache`, but the root `index.html` response didn't set any cache header at all. - Without it, the browser falls back to its own heuristic caching, so after an engine restart the page can keep showing a stale shell until the user hard-refreshes (Ctrl+F5) - even though `app.js`/`app.css` underneath were already being fetched fresh. - One-line fix: give `index.html` the same `no-cache` treatment its own assets already have. ## Test plan - [x] `python -m py_compile serve/server.py` - [ ] Manual: start the server, load the page, restart the server, reload without a hard refresh - page should reflect the current `index.html` without needing Ctrl+F5. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:36 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2593
No description provided.