fix: add cache-busting to prevent stale JS/CSS from breaking the UI
- Added ?v=20260502 query param to all <script src=...> and <link> tags - Added Cache-Control: no-cache, no-store, must-revalidate to index route - Added <meta> cache-control tags in HTML head for extra coverage - This ensures the browser always fetches fresh HTML/JS/CSS after deploy, preventing the old loadLastPrompt() from running against new HTML (which would crash since #prompt-cat-info no longer exists)
This commit is contained in:
@@ -14,7 +14,8 @@ router = APIRouter()
|
||||
|
||||
@router.get("/")
|
||||
def read_index():
|
||||
return FileResponse("static/index.html")
|
||||
headers = {"Cache-Control": "no-cache, no-store, must-revalidate"}
|
||||
return FileResponse("static/index.html", headers=headers)
|
||||
|
||||
|
||||
@router.get("/logs")
|
||||
|
||||
Reference in New Issue
Block a user