-
Notifications
You must be signed in to change notification settings - Fork 7
/
sw.js
59 lines (58 loc) · 1.62 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
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/dsc-logo-square.svg",
"./images/Facebook.svg",
"./images/Github.svg",
"./images/Instagram.svg",
"./images/landing.svg",
"./images/Linkedin.svg",
"./images/Twitter.svg",
"./images/Youtube.svg",
"./images/team.svg",
"./images/board19/abhishek.jpg",
"./images/board19/Lakshita.jpg",
"./images/board19/Mukul.jpg",
"./images/board19/MukulKumar.jpg",
"./images/board19/Rahul.jpg",
"./images/board19/Sourabh.jpg",
"./images/board19/Tushar.jpg",
"./images/board19/TusharRatwal.jpg",
"./images/board19/Urvi.jpg",
"./images/board19/Vachali.jpg",
"./images/board19/Vaibhav.jpg",
"./images/board19/VipinJoshi.jpg",
"./images/board19/Vivek.jpg",
"./images/board19/Yash.jpg",
"./images/board19/yukti.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);
})
);
});