Usually when the Ajax access server, from the sending request to establish a connection, to the server processing and return the data time is not too long, depending on the server set session time. Once the server is processing data slowly and may time out, the AJAX client will need special handling to handle the response. Example:
$.ajax ({
URL: "Export-base!getzip.shtml",
Type: "Post",
Data: "Seid=${seid}",
Ansyc:false,
Success:function (data) {
Window.location.href = "";
}
});
Ajax does not set any time-out limits, and the server configuration returns a time-out page, then success data returns the HTML string for the time-out page. The experience is not good ....
Therefore, one way is to set the timeout time, for example, with the server-side timeout time, assuming timeout:30 minutes, and then the client to do the monitoring:
Complete:function (xmlhttprequest,status) {
if (status== ' timeout ') {alert ("Sorry, Request timed out");}
}
This is a lot of friendliness ...
jquery Ajax timeout is not limited by default, what is the limit?