When testing for service worker capability in the browser:
(in index.html
)
if ('serviceWorker' in navigator) {
console.log('serviceWorker OK');
} else {
console.log('serviceWorker NOT OK');
}
Now if I call localhost/index.html
I get a positive result:
=> serviceWorker OK
Same when using loopback (127.0.0.1/index.html
).
Now if I call mymachine.local/index.html
suddenly the capability diseappears:
=> serviceWorker NOT OK
Is it an Avahi/Zeroconf restriction, or just a problem with my OS implementation?