Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.addEventListener('install', function(event) {
- event.waitUntil(
- caches.open(`v${cacheVersion}`)
- .then(function(cache) {
- return cache.addAll(cacheUrls);
- })
- );
- });
- self.addEventListener('fetch', function(event) {
- event.respondWith(
- caches.match(event.request).then(function(response) {
- return response || fetch(event.request);
- });
- );
- });
Add Comment
Please, Sign In to add comment