-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw.js
40 lines (32 loc) · 1008 Bytes
/
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
self.addEventListener('install', function(e) {
e.waitUntil(
caches.open('video-store').then(function(cache) {
return cache.addAll([
'/',
'index.html',
'uswds.min.js',
'styleguide.css',
'assets/img/favicons/favicon-57.png',
'assets/img/hero.png',
'assets/img/close.svg',
'assets/img/icon-https.svg',
'assets/img/icon-dot-gov.svg',
'assets/img/circle-124.png',
'assets/img/logo-img.png',
'assets/img/angle-arrow-down-primary.svg',
'assets/img/social-icons/svg/youtube15.svg',
'assets/img/social-icons/svg/twitter16.svg',
'assets/img/social-icons/svg/facebook25.svg',
'assets/img/social-icons/svg/rss25.svg'
]);
})
);
});
self.addEventListener('fetch', function(e) {
console.log(e.request.url);
e.respondWith(
caches.match(e.request).then(function(response) {
return response || fetch(e.request);
})
);
});