sw.js
643 Bytes
self.addEventListener('install', (e) => {
e.waitUntil(
caches.open('footseen').then((cache) => cache.addAll([
'/active2022/abc/',
'/active2022/abc/index.html',
'/active2022/abc/index.js',
'/active2022/abc/style.css',
'/active2022/abc/images/fox1.jpg',
'/active2022/abc/images/fox2.jpg',
'/active2022/abc/images/fox3.jpg',
'/active2022/abc/images/fox4.jpg',
])),
);
});
self.addEventListener('fetch', (e) => {
console.log(e.request.url);
e.respondWith(
caches.match(e.request).then((response) => response || fetch(e.request)),
);
});