cos takeigo zawsze daje "connetion timed out"
Kod
advAJAX.head({
url: "wp.pl",
timeout : 4000,
onTimeout : function() { alert("Connection timed out."); },
retry: 1,
onRetry : function() { alert("Retry connection..."); },
onRetryDelay : function() { alert("Awaiting retry..."); },
onSuccess : function(obj) { alert("ok" + obj.status); },
onError : function(obj) { alert("Error: " + obj.status); }
});
url: "wp.pl",
timeout : 4000,
onTimeout : function() { alert("Connection timed out."); },
retry: 1,
onRetry : function() { alert("Retry connection..."); },
onRetryDelay : function() { alert("Awaiting retry..."); },
onSuccess : function(obj) { alert("ok" + obj.status); },
onError : function(obj) { alert("Error: " + obj.status); }
});
a takie coś: (zawsze daje "ok" i status 200, nawet gdy strona nie istnieje)
Kod
advAJAX.get({
url: "stronaaaaaaaaa.pl",
timeout : 4000,
onTimeout : function() { alert("Connection timed out."); },
retry: 1,
onRetry : function() { alert("Retry connection..."); },
onRetryDelay : function() { alert("Awaiting retry..."); },
onSuccess : function(obj) { alert("ok" + obj.status); },
onError : function(obj) { alert("Error: " + obj.status); }
});
url: "stronaaaaaaaaa.pl",
timeout : 4000,
onTimeout : function() { alert("Connection timed out."); },
retry: 1,
onRetry : function() { alert("Retry connection..."); },
onRetryDelay : function() { alert("Awaiting retry..."); },
onSuccess : function(obj) { alert("ok" + obj.status); },
onError : function(obj) { alert("Error: " + obj.status); }
});
można sprawdzić link bezpośrednio przy pomocy advAJAX? czy muszę skorzystać z ajaxa bez advAJAX