forked from GDGVIT/DSC-official-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw.js
94 lines (93 loc) · 2.99 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
var filesToCache = [
'/',
'/index.html',
'/team.html',
'./css/index.css',
'./css/team.css',
'./css/svg.css',
'./js/team.js',
'./js/index.js',
'./images/after-landing.svg',
'./images/after-landing-dark.svg',
'./images/Behance.svg',
'./images/dsc-logo-square.svg',
'./images/Facebook.svg',
'./images/Github.svg',
'./images/Instagram.svg',
'./images/landing.svg',
'./images/Linkedin.svg',
'./images/Medium.svg',
'./images/Twitter.svg',
'./images/Youtube.svg',
'./images/team.svg',
'./images/board19/samarth.jpg',
'./images/board19/ayush.jpg',
'./images/board19/samyak.jpg',
'./images/board19/aritro.jpg',
'./images/board19/dhiraj.jpg',
'./images/board19/jayakrishna.jpg',
'./images/board19/abhishek.jpg',
'./images/board19/raina.jpg',
'./images/board19/apurva.jpg',
'./images/board19/preethi.jpg',
'./images/board19/amrut.jpg',
'./images/techteam/abhishek.jpg',
'./images/techteam/amogh.jpg',
'./images/techteam/ananya.jpg',
'./images/techteam/angad.jpg',
'./images/techteam/deepak.jpg',
'./images/techteam/nikhil.jpg',
'./images/techteam/paritosh.jpg',
'./images/techteam/prateek.jpg',
'./images/techteam/riddhi.jpg',
'./images/techteam/satkriti.jpg',
'./images/techteam/ubaid.jpg',
'./images/techteam/vikrame.jpg',
'./images/techteam/vishaal.jpg',
'./images/techteam/yaswant.jpg',
'./images/techteam/purushottam.jpg',
'./images/managers/akshat.jpg',
'./images/managers/arjun.jpg',
'./images/managers/cyril.jpg',
'./images/managers/deepak.jpg',
'./images/managers/dhruv.jpg',
'./images/managers/hardik.jpg',
'./images/managers/kritika.jpg',
'./images/managers/manorama.jpg',
'./images/managers/meherdeep.jpg',
'./images/managers/muskan.jpg',
'./images/managers/naynika.jpg',
'./images/managers/saloni.jpg',
'./images/managers/sanchi.jpg',
'./images/managers/shreya.jpg',
'./images/managers/shubham.jpg',
'./images/managers/vivek.jpg',
'./images/designers/ekaansh.jpg',
'./images/designers/aditya.jpg',
'./images/designers/riya.jpg',
'./images/designers/ruchica.jpg',
'./images/designers/shravani.jpg',
'./images/designers/ronish.jpg',
'./icons/icon-512x512.png',
'./icons/favicons/favicon.ico',
'./images/notification_icons/recruitments_blog.png'
];
self.addEventListener('install', function(e) {
console.log('[ServiceWorker] Install');
e.waitUntil(
caches.open('dscvit').then(function(cache) {
console.log('[ServiceWorker] Caching app shell');
return cache.addAll(filesToCache);
})
);
});
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim());
});
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request, {ignoreSearch:true}).then(response => {
return response || fetch(event.request);
})
);
});