-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw.js
36 lines (34 loc) · 1.01 KB
/
sw.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const version = "0.1.9";
self.addEventListener('install', function(e) {
e.waitUntil(
caches.open('the-magic-cache').then(function(cache) {
return cache.addAll([
'/',
'/index.html',
'/manifest.json',
'/codefiles/assets/hind.ttf',
'/codefiles/assets/icon.png',
'/codefiles/assets/icon512.png',
'/codefiles/assets/icons.ttf',
'/codefiles/assets/logotext.png',
'/codefiles/assets/ogbg.png',
'/codefiles/assets/ogicon.png',
'/codefiles/assets/phone.png',
'/codefiles/assets/whatsapp.png',
'/codefiles/css/main.css',
'/codefiles/js/hnav.js',
'/codefiles/js/main.js',
'/codefiles/js/papaparse.min.js',
'/codefiles/js/tabletop.min.js',
'/codefiles/js/vue.min.js'
]);
})
);
});
self.addEventListener('fetch', function(event) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request);
})
);
});