to stay https://blog.chromium.org/2018/02/a-secure-web-is- here-to-stay.html • Prefer Secure Origins For Powerful New Features http://www.chromium.org/Home/chromium-security/ prefer-secure-origins-for-powerful-new-features • HTTPS required https://developers.google.com/web/fundamentals/ primers/service-workers/#https
2 const urlsToCache = [ 3 '/', 4 '/index.html', 5 '/bundle.js' 6 ]; cache key name. ※ If you will change Service Worker jobs, change this name. Target file list to cache.
19 console.log('[ServiceWorker] Fetch') 20 e.respondWith( 21 caches.match(e.request) 22 .then((response) => { 23 return response || fetch(e.request) 24 }) 25 ) 26 }) Look for resources that match the available cache for the resource at the requested URL, This events is poffline’s processing.