Hi All,
I have found a problem with use JQuery timeout, i have a page with script, it's set a timeout and waiting response from server. The problem is when timeout have to perform, in short words, it "no action". I think that script not interrupt the connection with server and wait for server response, because in server side the connection is on for 10 sec (but timeout is set 5 sec). I see this problem when server work in different domain name then client, whereas when the server and client work in local this problem there isn't.
Have you a idea because this error happened or how to close the Script connection?
// client
$.ajax({
type: "GET",
url: "some.php",
data: "name=John&location=Boston",
timeout: 5000,
success: function(msg){
alert( "Data Saved: " + msg );
},
error: function(request, errorType, errorThrown){
alert("opppsssss .... ");
}
});
and the server code:
//some.php
< ?
//simulate long task
sleep(10); //sleep 10 seconds
//send response
echo "some test data";
? >
Best Regards
Domenico