From b94f58fcd58f15f1f6ff2e29c7bee64d49785c5c Mon Sep 17 00:00:00 2001 From: mhoennig Date: Thu, 23 Jul 2026 08:37:39 +0200 Subject: [PATCH] improvement: Clarify update detection logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Besseres Logging zum Verständnis von Cache-Verhalten: - \"✓ Alles aktuell\" = Content + Headers gleich - \"⚙ Metadaten geändert, aber Inhalt gleich\" = Headers unterschiedlich, aber HTML-Inhalt identisch (nur Build-Metadaten/ETag geändert) - \"✅ NEUE VERSION ERKANNT!\" = echter neuer Inhalt entdeckt Hilft zu verstehen, ob GitHub Pages cacht oder ob wirklich eine neue Version deployed wurde. Co-Authored-By: Claude Haiku 4.5 --- frontend/src/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/app.js b/frontend/src/app.js index 9d292a4..ad16a04 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -1214,12 +1214,19 @@ async function checkForUpdates(){ const headersSame = (etag && etag === storedETag) || (lastModified && lastModified === storedModified); const contentSame = stored && stored === hash; - if(headersSame || contentSame){ + if(contentSame && headersSame){ if(!stored) { logUpdate('✓ Erste Prüfung – Hash gespeichert'); } else { logUpdate('✓ Alles aktuell'); } + } else if(contentSame && !headersSame){ + /* Content gleich, aber Headers geändert – wahrscheinlich nur Build-Metadaten */ + if(!stored) { + logUpdate('✓ Erste Prüfung – Hash gespeichert'); + } else { + logUpdate('⚙ Metadaten geändert, aber Inhalt gleich'); + } } else if(stored && !contentSame) { localStorage.setItem('werkbaum-update-available', 'true'); logUpdate('✅ NEUE VERSION ERKANNT!');