1var dataCacheName = 'sharesome-v1'; 2var cacheName = 'sharesome-v1'; 3var filesToCache = [ 4 "/manifest.json", 5]; 6 7self.addEventListener('install', function (e) { 8 e.waitUntil( 9 caches.open(cacheName).then(function (cache) { 10 return cache.addAll(filesToCache); 11 }) 12 ); 13}); 14 15self.addEventListener('activate', function (e) { 16 e.waitUntil( 17 caches.keys().then(function (keyList) { 18 return Promise.all(keyList.map(function (key) { 19 if (key !== cacheName && key !== dataCacheName) { 20 return caches.delete(key); 21 } 22 })); 23 }) 24 ); 25 return self.clients.claim(); 26});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.