I created a new website and added a service worker. It gets installed but refuses to work offline. I am loading all resources from cache explicitly by specifying all the URL's. Could someone explain why is the main request failing?
Link: http://ashutoshysingh.com/sw.js
Update 1: I have readded the index.html file in cache.
- Error shown in Firefox console:
Failed to load 'https://www.ashutoshysingh.com/'. A ServiceWorker passed a promise to FetchEvent.respondWith() that rejected with 'TypeError: NetworkError when attempting to fetch resource.'.
- Error in Chrome console:
The FetchEvent for "https://www.ashutoshysingh.com/" resulted in a network error response: the promise was rejected.