Skip to content

Instantly share code, notes, and snippets.

@simevidas
Created October 17, 2018 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simevidas/79c809abbad02f26ca29cfd5f7c29499 to your computer and use it in GitHub Desktop.
Save simevidas/79c809abbad02f26ca29cfd5f7c29499 to your computer and use it in GitHub Desktop.
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("/workbox-v3.6.1/workbox-sw.js");
workbox.setConfig({modulePathPrefix: "/workbox-v3.6.1"});
importScripts(
"/precache-manifest.6775757e8ee04d884d883baca06e5067.js"
);
workbox.skipWaiting();
workbox.clientsClaim();
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerNavigationRoute("/index.html", {
whitelist: [/^\/issues/,/^\/about/],
});
workbox.routing.registerRoute(/\/(ajax|media)\//, workbox.strategies.networkFirst({ "cacheName":"content-cache", plugins: [] }), 'GET');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment