This site is mobile accessible. Press the "Tap Here" button to use a different font-size.



Smartphone icons created by Freepik - Flaticon

The Navigator Object

The onLine property returns true if the browser is online:

// detects whether the browser is online and returns "true" if it is
document.getElementById("demo").innerHTML =
"navigator.onLine is " + navigator.onLine;