From f4b15dde4738b54c763ca3f9331f179a43d49163 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 18 Aug 2026 07:43:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20index.html=E5=BC=BA=E5=88=B6no-cache(?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E7=BC=93=E5=AD=98=E8=87=B4=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E6=94=B9=E5=8A=A8=E4=B8=8D=E7=94=9F=E6=95=88,?= =?UTF-8?q?=E5=AD=90Tab=E7=9C=8B=E4=B8=8D=E5=88=B0=E6=A0=B9=E5=9B=A0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 335ded78..1e44afab 100644 --- a/server.py +++ b/server.py @@ -230,7 +230,12 @@ def _save_watchlist(data): @app.route("/") def index(): - return send_from_directory(app.static_folder, "index.html") + # 2026-08-18 强制不缓存 index.html(浏览器缓存导致前端改动不生效,老莫反馈子Tab看不到) + resp = send_from_directory(app.static_folder, "index.html") + resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" + resp.headers["Pragma"] = "no-cache" + resp.headers["Expires"] = "0" + return resp @app.route("/api/watch")