Ticket #10282 (closed bug: wontfix)
.ajax's timeout invalidates all remaining ajax calls delegated to XHR object by browser
|Reported by:||kon@…||Owned by:||kon@…|
There is a limit to how many XHR objects can be created by the browser. The browser will reuse the same XHR object to make the rest of the calls - a queue based implementation.
The issue arises when multiple .ajax() requests are issued and a timeout is set. The start time of the timeout is set from the instant that the call is issued (nonblocking call). The call itself might not be processed though if too many requests go out as the browser creates only so many XHR objects. As soon as one times out, it invalidates the rest of the calls, even though the actual request has not been sent yet.
In IE (8+), accessible via window.maxConnectionsPerServer, you are able to find out how many XHR objects you will be able to create at any one time. I am not familiar of any such implementation on any other browser. It is suggested to implement a queue-like approach based on this, or the numbers specified by the browsers. At the least, the documentation should perhaps be updated to reflect how the timeout behaves for asynchronous requests.
- Owner set to kon@…
- Status changed from new to pending
- Component changed from unfiled to ajax
- Status changed from pending to closed
- Resolution set to invalid
- Status changed from closed to reopened
- Resolution invalid deleted
- Status changed from reopened to closed
- Resolution set to wontfix