Created
August 12, 2018 06:10
-
-
Save masalib/7647f3dfa7090d945262509a38cc3209 to your computer and use it in GitHub Desktop.
PWA:Workboxとは
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
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.4.1/workbox-sw.js'); | |
if (workbox) { | |
workbox.routing.registerRoute( | |
/.*\.css/, | |
workbox.strategies.staleWhileRevalidate({ | |
cacheName: 'css-cache', | |
}) | |
); | |
} else { | |
console.log(`Boo! Workbox didn't load 😬`); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment