If you have the empty fetch call back in service worker, PWA will no longer be installable from august 2021.
You have to respond with custom response in fetch request, check if request is in cache then send file from cache else proceed with request
self.addEventListener('fetch', (evt) => {
evt.respondWith(
caches.match(evt.request).then((cacheRes) => {
return cacheRes || fetch(evt.request)
})
)
})
Top comments (0)