aboutsummaryrefslogtreecommitdiff
path: root/sw.js
blob: 0cac448a2df60afc258046d53ceb8db691c74eea (plain)
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
importScripts('cache-polyfill.js');

self.addEventListener('install', function(e) {

e.waitUntil(

caches.open('Navan Chauhan').then(function(cache) {

return cache.addAll([

'/css/menu.css',
  '/',
  'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js',
  'https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css',
  'https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.css',
  'https://www.w3schools.com/lib/w3.js',
  
  '/js/menu.js',
  'css/style.css',
  'css/timeline.css',
  '/js/timeline.js',

'/index.html',
'/css/contact.css',
  
'/Contact.html',
'/projects.html',

'/404.html'


]);
})

);

});
self.addEventListener('fetch', function(event) {

console.log(event.request.url);

event.respondWith(

caches.match(event.request).then(function(response) {

return response || fetch(event.request);

})

);

});