Im facing an issue when registering my service worker, got a rejected promise and the error description says "TypeError: Invalid argument")
any thoughts ?
Thanks! German.
Note 1: This happens only when https is on, using localhost works like a charm).
Note 2: This happens only on Microsoft Edge (ver 17), Chrome and Firefoxs works as expected.
Note 3: Im working in an non authenticated scenario, just pointing this out because of this thread: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17360912/
Note 4: example working site using service worker on Edge: https://serviceworke.rs/strategy-cache-only_demo.html (proves that indeed there's a solution!)
This is my code:
navigator.serviceWorker.register("sw.js")
.then(function() {
alert("never goes here..");
})
.catch(function(e) {
alert("always enter here!!");
});