1/** 2 * Check out https://googlechromelabs.github.io/sw-toolbox/ for 3 * more info on how to use sw-toolbox to custom configure your service worker. 4 */ 5 6 7'use strict'; 8importScripts('./build/sw-toolbox.js'); 9 10self.toolbox.options.cache = { 11 name: 'ionic-cache' 12}; 13 14// pre-cache our key assets 15self.toolbox.precache( 16 [ 17 './build/main.js', 18 './build/vendor.js', 19 './build/main.css', 20 './build/polyfills.js', 21 'index.html', 22 'manifest.json' 23 ] 24); 25 26// dynamically cache any other local assets 27self.toolbox.router.any('/*', self.toolbox.fastest); 28 29// for any other requests go to the network, cache, 30// and then only use that cached resource if your user goes offline 31self.toolbox.router.default = self.toolbox.networkFirst;
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.