JQuery ajax call default timeout value JQuery ajax call default timeout value jquery jquery

JQuery ajax call default timeout value


There doesn't seem to be a standardized default value. I have the feeling the default is 0, and the timeout event left totally dependent on browser and network settings.

For IE, there is a timeout property for XMLHTTPRequests here. It defaults to null, and it says the network stack is likely to be the first to time out (which will not generate an ontimeout event by the way).


As an aside, when trying to diagnose a similar bug I realised that jquery's ajax error callback returns a status of "timeout" if it failed due to a timeout.

Here's an example:

$.ajax({    url: "/ajax_json_echo/",    timeout: 500,    error: function(jqXHR, textStatus, errorThrown) {        alert(textStatus); // this will be "timeout"    }});

Here it is on jsfiddle.