Explorar o código

#4480 Install updated service worker immediately

Alex Trofimov %!s(int64=3) %!d(string=hai) anos
pai
achega
4e7dc52319
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      sw.js.php

+ 1 - 0
sw.js.php

@@ -70,6 +70,7 @@ let coreAssets = <?php echo json_encode($aAssets); ?>;
 
 // On install, cache core assets
 self.addEventListener('install', function (event) {
+    self.skipWaiting();
     // Cache core assets
     event.waitUntil((async () => { 
         caches.open('<?php echo $sCacheName; ?>').then(function (cache) {