Skip to content

Instantly share code, notes, and snippets.

@glauberramos glauberramos/sw.js
Created Oct 10, 2017

Embed
What would you like to do?
Runtime caching using workbox
workboxSW.router.registerRoute('https://cdnjs.cloudflare.com/(.*)', workboxSW.strategies.staleWhileRevalidate({}), 'GET');
workboxSW.router.registerRoute('https://res.cloudinary.com/dc3dnmmpx/image/upload/(.*)', workboxSW.strategies.staleWhileRevalidate({}), 'GET');
workboxSW.router.registerRoute('https://unpkg.com/(.*)', workboxSW.strategies.staleWhileRevalidate({}), 'GET');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.