Created
July 17, 2017 13:26
-
-
Save Chalarangelo/3e74acdae08ed94abf897ad98b87baed 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
var cacheName = 'mockApp-v1.0.0'; | |
var filesToCache = [ | |
'./', | |
'./index.html', | |
'./manifest.json', | |
'./static/js/bundle.js' | |
]; | |
self.addEventListener('install', function(e) { | |
e.waitUntil(caches.open(cacheName) | |
.then(function(cache) { | |
return cache.addAll(filesToCache) | |
.then(function() { | |
self.skipWaiting(); | |
}); | |
})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment