1importScripts('/workbox/3.6.3/workbox-sw.js'); 2 3 4if (workbox) { 5 workbox.setConfig({ 6 modulePathPrefix: '/workbox/3.6.3/' 7 }); 8 workbox.core.setCacheNameDetails({ 9 prefix: 'dubai-travel-diary' 10 }); 11 console.log('Yay! Workbox is loaded ð 31/01/2019 v2'); 12 workbox.routing.registerRoute( 13 /design\/rlab\/.+/, 14 workbox.strategies.cacheFirst() 15 ); 16 workbox.routing.registerRoute('/', workbox.strategies.staleWhileRevalidate()); 17 18 workbox.routing.registerRoute( 19 /\.(?:js|css)$/, 20 workbox.strategies.staleWhileRevalidate({ 21 cacheName: 'static-resources', 22 plugins: [ 23 new workbox.expiration.Plugin({ 24 // Cache only 20 files 25 maxEntries: 5, 26 // Cache for a maximum of a week 27 maxAgeSeconds: 7 * 24 * 60 * 60, 28 }) 29 ] 30 }) 31 ); 32 workbox.routing.registerRoute( 33 /.*(?:googleapis|gstatic)\.com/, 34 workbox.strategies.staleWhileRevalidate() 35 ); 36} else { 37 console.log('Boo! Workbox didn"t load ð¬'); 38}
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.