Is there any way to check reachability test of server .If application not able to connect server then it show a alert? is there any thing method to check.. I check the internet connection .If there is no connection then i am showing a alert .But if there is an connection but there is no reachability of server than how can i handle this.? I am checking like this connection status..!!
setInterval(function () {
connectionStatus = navigator.onLine ? 'online' : 'offline';
if(connectionStatus=="offline"){
// alert("There is no connection");
}
}, 100);
$.ajax({url: "192.168.12.171",
dataType: "jsonp",
statusCode: {
200: function (response) {
alert('status 200');
},
404: function (response) {
alert('status 404 ');
}
}
});