service-worker.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * Welcome to your Workbox-powered service worker!
  3. *
  4. * You'll need to register this file in your web app and you should
  5. * disable HTTP caching for this file too.
  6. * See https://goo.gl/nhQhGp
  7. *
  8. * The rest of the code is auto-generated. Please don't update this file
  9. * directly; instead, make changes to your Workbox build configuration
  10. * and re-run your build process.
  11. * See https://goo.gl/2aRDsh
  12. */
  13. importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
  14. importScripts(
  15. "precache-manifest.481ece45b2de0cf1df196d82d1178405.js"
  16. );
  17. workbox.skipWaiting();
  18. workbox.clientsClaim();
  19. /**
  20. * The workboxSW.precacheAndRoute() method efficiently caches and responds to
  21. * requests for URLs in the manifest.
  22. * See https://goo.gl/S9QRab
  23. */
  24. self.__precacheManifest = [].concat(self.__precacheManifest || []);
  25. workbox.precaching.suppressWarnings();
  26. workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
  27. workbox.routing.registerNavigationRoute("index.html");
  28. workbox.routing.registerRoute(/\/@webcomponents\/webcomponentsjs\//, workbox.strategies.staleWhileRevalidate(), 'GET');
  29. workbox.routing.registerRoute(/\/images\//, workbox.strategies.staleWhileRevalidate(), 'GET');