I can not meet the specifications of progressive web apps because my service worker does not cache the web app.
Follow 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);
})
);
});