fix cache :3

This commit is contained in:
Ashley 2023-12-30 15:21:00 +00:00
parent a91feb61af
commit d55e146e73

View file

@ -1686,9 +1686,21 @@ checkbox.addEventListener('change', function(e) {
} }
}); });
var cacheVersion = 1; if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for (let registration of registrations) {
registration.unregister();
}
});
if ('caches' in window) {
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
caches.delete(cacheName);
});
});
}
caches.delete('offline-cache' + cacheVersion) }
if (/[?&]autoplay=/.test(location.search)) { if (/[?&]autoplay=/.test(location.search)) {
checkbox.checked = true; checkbox.checked = true;