Quantcast
Viewing latest article 5
Browse Latest Browse All 10

Check internet connection using JavaScript

Sometimes you need to check device have internet connection or not. This can be done by simple JavaScript function var connectionMessage = "Your device have internet connection."; var noConnectionMessage = "Ohh! It seems that your device dont have internet connection."; window.onload = checkInternetConnection; function checkInternetConnection() { var isOnLine = navigator.onLine; if (isOnLine) { alert(connectionMessage); } … Continue reading Check internet connection using JavaScript

Viewing latest article 5
Browse Latest Browse All 10

Trending Articles