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

@@ -21,20 +21,6 @@
window.INTERCEPT_ADSB_AUTO_START = {{ adsb_auto_start | tojson }};
window.INTERCEPT_DEFAULT_LAT = {{ default_latitude | tojson }};
window.INTERCEPT_DEFAULT_LON = {{ default_longitude | tojson }};
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(() => {});
}
});
}
</script>
<script defer src="{{ url_for('static', filename='vendor/leaflet/leaflet.js') }}"></script>
<script defer src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>

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();

View File

@@ -18,20 +18,6 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/satellite_dashboard.css') }}">
<script>
window.INTERCEPT_SHARED_OBSERVER_LOCATION = {{ shared_observer_location | tojson }};
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(() => {});
}
});
}
</script>
<script src="{{ url_for('static', filename='js/core/observer-location.js') }}"></script>
</head>