Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AJAX (XmlHttpRequest) timeout length by browser

I've been scouring the web trying to find a straight answer to this. Does anyone know the default timeout lengths for ajax request by browser? Also by version if it's changed?

like image 374
wajiw Avatar asked Feb 29 '12 16:02

wajiw


People also ask

How long is browser timeout?

About this task. The GUI Inactivity Timeout defaults to 900 seconds (15 minutes). If a user's browser session is not active for this amount of time, the session times out. As required, you can increase or decrease the timeout period by setting the GUI Inactivity Timeout display option.

What is the default timeout for XMLHttpRequest?

The XMLHttpRequest. timeout property is an unsigned long representing the number of milliseconds a request can take before automatically being terminated. The default value is 0, which means there is no timeout.

Does browser have timeout?

Most web browsers seem have a “time-out” or “keep-alive” parameter of a few minutes. This means that if there is no network traffic between your device and the web page on the server, the browser will automatically break the connection.

What is the default timeout for Ajax?

The default value is 0 , which means there is no timeout.


1 Answers

According to the specs, the timeout value defaults to zero, which means there is no timeout. However, you can set a timeout value on the XHR.timeout property; the value is in milliseconds.

Sources:

http://www.w3.org/TR/2011/WD-XMLHttpRequest2-20110816/#the-timeout-attribute http://msdn.microsoft.com/en-us/library/cc304105(v=vs.85).aspx

like image 126
monsur Avatar answered Sep 22 '22 19:09

monsur