1
I cannot meet the specifications of Progressive web apps because my service worker does not cache the web app.
Follows the code:
self.addEventListener('install', e => {
let timeStamp = Date.now();
e.waitUntil(
caches.open('dashboardetica.azurewebsites.net').then(cache => {
return cache.addAll([
'.',
'/',
'./',
'/Home/'
])
.then(() => self.skipWaiting());
})
)
});
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);
})
);
});