Spaces:
Sleeping
Sleeping
| self.addEventListener('install', function(event) { | |
| event.waitUntil( | |
| caches.open('taskbot-cache').then(function(cache) { | |
| return cache.addAll([ | |
| '/', | |
| '/static/style.css', | |
| '/static/script.js', | |
| '/static/icon-192.png' | |
| ]); | |
| }) | |
| ); | |
| }); | |
| self.addEventListener('fetch', function(event) { | |
| event.respondWith( | |
| caches.match(event.request).then(function(response) { | |
| return response || fetch(event.request); | |
| }) | |
| ); | |
| }); | |