1👍
Your Project must be serve over localhost:[8000]
or HTTPS.
If you serve it on local network like 192.168.43.101
you should change it to localhost or install SSL crt. on it.
Service workers require a Secure Context.
The value of
window.isSecureContext
indicates whether
[SecureContext]
features are visible or hidden. (This istrue
on a
file://
URL and the serviceWorker API will be visible, but it won’t
work, of course.)
Source:stackexchange.com