Skip to content

Instantly share code, notes, and snippets.

@filipbech
Created May 30, 2018 06:50
Show Gist options
  • Save filipbech/f968198e2d7459a03e09a80b07cf2c62 to your computer and use it in GitHub Desktop.
Save filipbech/f968198e2d7459a03e09a80b07cf2c62 to your computer and use it in GitHub Desktop.
self.addEventLister('fetch', event => {
if (event.request.url === 'app.js') {
event.respondWith(caches.match(new Request(event.request.url, {
mode: 'cors',
credentials: 'omit'
})
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment