-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsw.js
48 lines (45 loc) · 1.29 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
37
38
39
40
41
42
43
44
45
46
47
48
var cacheName = 'app_serviceworker_v_4';
var cacheUrls = [
'/',
'/manifest.json',
'/builded_assets/scripts/index.js',
'/builded_assets/styles/index.css',
'/static/about.svg',
'/static/downArrow.svg',
'/static/github.svg',
'/static/install.svg',
'/static/iosActions.svg',
'/static/love.svg',
'/static/offline.svg',
'/static/addToHome.svg',
'/static/robotomono-regular.woff2',
'/static/icons/icon-512x512.png',
'/static/icons/icon-128x128.png',
'/static/icons/icon-144x144.png',
'/static/icons/icon-152x152.png',
'/static/icons/icon-192x192.png',
'/static/icons/icon-384x384.png',
'/static/icons/icon-72x72.png',
'/static/icons/icon-96x96.png',
'/static/splash/launch-1125x2436.png',
'/static/splash/launch-1242x2148.png',
'/static/splash/launch-1536x2048.png',
'/static/splash/launch-1668x2224.png',
'/static/splash/launch-2048x2732.png',
'/static/splash/launch-640x1136.png',
'/static/splash/launch-750x1294.png'
];
self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(cacheName).then(function (cache) {
return cache.addAll(cacheUrls);
})
);
});
self.addEventListener('fetch', function (event) {
event.respondWith(
fetch(event.request).catch(function () {
return caches.match(event.request);
})
);
});