Is there a security limit to the number of Ajax XMLHttpRequest objects you can create on a single page? If so, does this vary from one browser to another?
A:
I don't think so, but there's a limit of two simultaneous HTTP connections per domain per client (you can override this in Firefox, but practically no one does so).
Kevin
2008-09-10 14:42:28
Nowadays, this limit is higher, e.g. on my current Firefox (3.6.3/Linux) the default number of simultaneous HTTP connections is 6. You can test it with [this little test case](http://www.spasche.net/files/parallel_connections/).
Marcel Korpel
2010-06-20 01:32:12
A:
Yes, as Kevin says, HTTP/1.1 specifications say "A single-user client should not maintain more than 2 connections with any server or proxy."
fluteflute
2008-09-10 14:55:58
A:
I've found it easier to pool and reuse XMLHTTPRequest objects instead of creating new ones...
FlySwat
2008-09-10 15:11:19
Agreed, but that doesn't work if you want to have multiple simultaneous requests.
Marcel Korpel
2010-06-20 01:26:55