Created
November 28, 2019 07:44
-
-
Save abdelfattah-atef94/34f4d62d38888dd2fa44e9f661617a76 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
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js'); | |
// Custom Adjustments | |
// To cache api data using cache first startegy | |
workbox.routing.registerRoute( | |
new RegExp('https://jsonplaceholder.typicode.com/users'), | |
workbox.strategies.cacheFirst() | |
); | |
workbox.precaching.precacheAndRoute([]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment