Progressive Web App - Service Worker not serving start_URL
Just a note... you notice above that the pages are being served over "https." But, if you have everything else right, and are not using https, you will get this same error message.
Noted from Register A service worker,
If we register the service worker file at
/example/sw.js
, then the service worker would only seefetch
events for pages whose URL starts with/example/
(i.e./example/page1/
,/example/page2/
).
Inline with the shown error and given in this documentation, check the following:
- Define a
start_url
property in yourmanifest.json
file.- Ensure that your service worker properly caches a resource that matches the value of
start_url
.
Also, check this tutorial and see if it will help you.