Created
October 17, 2018 20:18
-
-
Save simevidas/79c809abbad02f26ca29cfd5f7c29499 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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