diff --git a/server.py b/server.py index c871079..8b0e768 100644 --- a/server.py +++ b/server.py @@ -2417,4 +2417,10 @@ def list_all_service_entrances(): app.mount("/uploads", StaticFiles(directory=str(UPLOADS_DIR)), name="uploads") if STATIC_DIR.exists(): - app.mount("/", StaticFiles(directory=str(STATIC_DIR), html=True), name="static") + class NoCacheStaticFiles(StaticFiles): + async def get_response(self, path, scope): + resp = await super().get_response(path, scope) + # No-cache for all static assets (HTML, images, JS, CSS) + resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate" + return resp + app.mount("/", NoCacheStaticFiles(directory=str(STATIC_DIR), html=True), name="static") diff --git a/static/index.html b/static/index.html index b5b898e..145a871 100644 --- a/static/index.html +++ b/static/index.html @@ -3126,7 +3126,7 @@ // ── Category config ─────────────────────────────────────────────────── const CATEGORY_MAP = { 'Bev': { icon: '🥤', color: '#0a7ab5' }, - 'Snack': { icon: '', color: '#c97d0e' }, + 'Snack': { icon: '', color: '#c97d0e' }, 'Gf bev': { icon: '🧃', color: '#0a9e5a' }, 'Gf food': { icon: '🥪', color: '#8a5c2a' }, 'Other': { icon: '📦', color: '#6b7280' },