No Internet connection how to do?

Saw on one site - this alert how to do JS?
Thank you.
June 3rd 19 at 19:29
2 answers
June 3rd 19 at 19:31
Check the property window.navigator.onLine
June 3rd 19 at 19:33
Make an ajax request
The answer is no and falls with a timeout, or an error of some kind.
Show notification that no Internet.

Find more questions by tags JavaScript