1self.addEventListener('install', function(event) { 2 event.waitUntil( 3 caches.open('offline').then(function(cache) { 4 return cache.add('/offline.html'); 5 }) 6 ); 7}); 8 9self.addEventListener('fetch', function(event) { 10 if (event.request.mode === 'navigate' && event.request.method === 'GET') { 11 return event.respondWith( 12 fetch(event.request).catch(function(error) { 13 return caches.open('offline').then(function(cache) { 14 return cache.match('/offline.html'); 15 }) 16 }) 17 ); 18 } 19});
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.