Skip to content

Instantly share code, notes, and snippets.

@kypflug

kypflug/sw-7.js Secret

Created Dec 15, 2017
Embed
What would you like to do?
self.onfetch = function(event) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request).catch(function() {
return caches.match('/fallback.htm1');
});
})
);
}
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.