Skip to content

Instantly share code, notes, and snippets.

@benfoxall
Last active September 22, 2017 13:38
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 benfoxall/73f2dc9536f1fcf3a96fe763e509a45d to your computer and use it in GitHub Desktop.
Save benfoxall/73f2dc9536f1fcf3a96fe763e509a45d to your computer and use it in GitHub Desktop.
Other Service Workers
importScripts('https://unpkg.com/sw-toolbox@3.6.0/sw-toolbox.js')
toolbox.router.get('/:path*', toolbox.cacheFirst, {
origin: /fonts\.(gstatic|googleapis)\.com/,
cache: {
name: 'fonts-v1',
maxEntries: 10
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment