I have this code:
$(function(){
var stime=0,td=0;
pingend=function(){
if(td<2){
pingstart();
td++;
}else if(td!=-1){
$("#ping_image_add").html(Math.round(new Date().getTime()-stime)+"ms");
td=-1;
}
}
pingstart=function(){
stime = new Date().getTime();
$("#ping_image_add").html("Testing... <img id=\"ping_image\" src=\"http://87.98.243.201/"+stime+"\" />");
$("#ping_image").bind("error").error(
function() {
pingend();
}).ready( function() {
pingend;
});
}
pingstart();
});
the code works fine, but in the console say:
1471126250760:1 GET http://87.98.243.201/1471126250760 404 (Not Found)
and this code is for do ping to server on client side, and is the only way which i founded, how i can hide that error message?