Преглед изворни кода

#4480 Install updated service worker immediately

Alex Trofimov пре 3 година
родитељ
комит
4e7dc52319
1 измењених фајлова са 1 додато и 0 уклоњено
  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) {