Answer the question
In order to leave comments, you need to log in
How to check internet connection?
How can I track a disconnect from the Internet on the client side? There was an attempt to use the OnlineJS library, there is an event handler there. But it doesn't work in phone browsers.
Answer the question
In order to leave comments, you need to log in
There are rumors that sometimes it shows incorrectly, but the solution out of the box is navigator.onLine .
Alternative: XHR request with 1s timeout (if you need to support slow clients - tweak) on google.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question