From dc5f850d3a879d2282d283aff58ddaf165ea0365 Mon Sep 17 00:00:00 2001 From: EiSiMo Date: Thu, 23 Apr 2026 12:59:20 +0200 Subject: [PATCH] chore(web): cache-bust own static assets with build SHA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Append ?v= to /static/app.css, /static/app.js, /static/map.js. Each deploy ⇒ new SHA ⇒ new URL ⇒ browsers re-fetch on any reload, no Ctrl+Shift+R required. Symptom that prompted this: fresh JS shipped to prod but the user kept running the cached one because plain Ctrl+R can serve from disk cache when responses lack explicit Cache-Control. Login page (which doesn't pass git_commit_short) falls back to 'dev'. Co-Authored-By: Claude Opus 4.7 (1M context) --- web/templates/base.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/templates/base.html b/web/templates/base.html index be3464d..f267003 100644 --- a/web/templates/base.html +++ b/web/templates/base.html @@ -12,9 +12,12 @@ integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""> - - - + {# Cache-bust own static assets per deploy: SHA changes ⇒ URL changes ⇒ + browsers always pull fresh JS/CSS without a Ctrl+Shift+R. #} + {% set _v = git_commit_short or 'dev' %} + + + {% block body %}{% endblock %}