diff --git a/CLAUDE.md b/CLAUDE.md index b45d90c..854ba9c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -239,3 +239,27 @@ phasen: P12: Test-Suite (pytest, 30 Tests) + Doku ``` +## Cache-Buster bei Frontend-Aenderungen + +```yaml +cache_buster: + hintergrund: | + src/static/dashboard.html und index.html laden JS+CSS mit Versions-Suffix + ?v=YYYYMMDD. Ohne den Bump cacht der Browser alte JS aggressiv. + Symptom: User sieht alte UI obwohl Live aktuell deployed ist. + + regel: | + Bei JEDER Aenderung an .js oder .css unter src/static/ das ?v=YYYYMMDD + auf das aktuelle Datum bumpen. Genuegt einmal pro Tag - mehrfache + Aenderungen am selben Tag teilen sich die Version. + + betroffene_files: + - src/static/dashboard.html (4x JS, 1x CSS) + - src/static/index.html (1x CSS) + + schnelle_aktualisierung: | + sed -i 's/?v=2026[0-9]\{4\}/?v='$(date +%Y%m%d)'/g' src/static/dashboard.html src/static/index.html + + testen: "Strg+Shift+R im Browser (Hard-Reload) zeigt sofort die neue Version." +``` +