1var staticCacheName = 'pwa-' + new Date().getTime(); 2 3var filesToCache = [ 4 '/offline', 5 '/css/app.css', 6 '/js/app.js', 7 8 /* 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=72&h=72&s=13e875f81452185a2a4f2da0028d84cf', 9 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=96&h=96&s=53ed8ddfc499c522cd30b372d6e9a40c', 10 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=128&h=128&s=dcd16f2df567d516f6a3ed2a2f5e6a4d', 11 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=144&h=144&s=960417eb0484dcdc7c53d6e2030954d8', 12 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=152&h=152&s=18e3e2ce37c32c53fc1e33d1f9b2b599', 13 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=192&h=192&s=d970c2a520bd016a6eb0da545d629363', 14 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=384&h=384&s=70a6524a2b685fc8cbfa0457f5e15062', 15 'https://aldeiadotamega.com/platform-images/settings/pwa_icon_image/eb845aa6-3d6d-4953-acf5-675dab29abcb.png?fm=png&fit=crop&w=512&h=512&s=7227041fb9928235e696196b3fc408b0', 16 */ 17]; 18 19// Cache on install 20self.addEventListener("install", event => { 21 this.skipWaiting(); 22 event.waitUntil( 23 caches.open(staticCacheName) 24 .then(cache => { 25 return cache.addAll(filesToCache); 26 }) 27 ) 28}); 29 30// Clear cache on activate 31self.addEventListener('activate', event => { 32 event.waitUntil( 33 caches.keys().then(cacheNames => { 34 return Promise.all( 35 cacheNames 36 .filter(cacheName => (cacheName.startsWith("pwa-"))) 37 .filter(cacheName => (cacheName !== staticCacheName)) 38 .map(cacheName => caches.delete(cacheName)) 39 ); 40 }) 41 ); 42}); 43 44// Serve from Cache 45self.addEventListener("fetch", event => { 46 event.respondWith( 47 caches.match(event.request) 48 .then(response => { 49 return response || fetch(event.request); 50 }) 51 .catch(() => { 52 return caches.match('offline'); 53 }) 54 ) 55});
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.