Normally one would use navigator.onLine
. This works fine for 90% of scenarios.
What about if you are connected to a Wi-Fi network but have 100% packet loss? The onLine
property described above will tell you that you are connected as your connection to the network is fine, but you have absolutely no internet connection. Is there any way to get around this?
I simply want to check if a working internet connection is present.