Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138249

Django and navigator.serviceWorker.register is working only localhost

$
0
0

In my project I have such line of code

navigator.serviceWorker.register('{% static "js/firebase-messaging-sw.js" %}')

But if I launch my project not on localhost, I got an error Uncaught TypeError: Cannot read property 'register' of undefined


Viewing all articles
Browse latest Browse all 138249

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>