Stop clearing browser caches on load

This commit is contained in:
James Smith
2026-03-19 07:43:32 +00:00
parent 595a2003d5
commit 63237b9534
3 changed files with 0 additions and 43 deletions

View File

@@ -16407,22 +16407,7 @@
</div>
</div>
<!-- Disable legacy static-asset service worker to avoid stale dashboard JS/CSS -->
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.getRegistrations()
.then((registrations) => Promise.all(registrations.map((registration) => registration.unregister())))
.catch(() => {});
if ('caches' in window) {
caches.keys()
.then((keys) => Promise.all(
keys.filter((key) => key.startsWith('intercept-')).map((key) => caches.delete(key))
))
.catch(() => {});
}
});
}
// Initialize global core modules after page load
window.addEventListener('DOMContentLoaded', () => {
if (typeof VoiceAlerts !== 'undefined') VoiceAlerts.init();