Closed asalas91 closed 5 years ago
What's the url for your ajax call?
That happens for not reading correctly... I thought that by registering the service-worker.js the file was automatically created...
This is the code where I'm trying to register service but...
// TODO add service worker code here if ('serviceWorker' in navigator) { navigator.serviceWorker .register('./service-worker.js') .then(function() { console.log('Service Worker Registered'); }) .catch(function(err){ console.log('Filed to register', err); }); }
Always falls into the catch :/
Well, I was making use of vhost, which is why I got error with the service-worker.js
Before my url was: pwapp.dev/work
now my url is: localhost/pwapp/work/ :/
it's working fine, thanks!
Show message in console
Uncaught (in promise) DOMException: Only secure origins are allowed (see: https://goo.gl/Y0ZkNV).
I'm working in localhost... 127.0.0.1 with LAMP server on Elementary Os and Vhost added
Help me, please!