hi! service worker + navigator.onLine
-
Thanks for the plugin. It’s a great idea!
Are you mantaining it?
I have seen that you are using a library to test the connection. The problem is that today you can use a better option to test the connection.
I have tried it with a PWA and it doesn’t work (maybe it crashes with the “service worker”.
The point is to use this script instead. I have been trying it and it works perfectly for web and webApps (service worker installed)<script>
setInterval(function(){
if (navigator.onLine) {
console.log(“online”);
} else {
console.log(“offline”);
}
}, 4000);
</script>Let me know If you would like to use it this way, thanks!!!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘hi! service worker + navigator.onLine’ is closed to new replies.