3.2.0

Multiple requests at once..

I have a number of pages that have mutliple grids on them all containing different data all related to a central point. What I'm wanting to do is to have each of those load independently of each other and at the same time.

The problem I am having however is that each request waits till the previous finishes before getting the next bit of data.

All the data is being generated via perl cgi script.

Grid1
Grid2
Grid3
Grid4

grid1.request;
grid2.request;
grid3.request;
grid4.request;

Now, I would assume by having those sequential each would start as soon as it is called but unfortunately the 2-4 grids never show up until the first, 3-4 only after 2, etc. Its always sequential. I'd love all to be populated as the data is returned as I know 4 runs faster than 1-3.

Thoughts?
Mike
April 30,
Normally the browser is restricted to 2 connections per host for HTTP 1.1 connections. The usual workaround is to assign different hostnames to your server and send different requests to different servers, this works well for images and script files -

http://www.ajaxperformance.com/?p=33

However it will not work for XMLHttpRequest calls due to cross-domain security restrictions. There might be some workarounds with document.domain property but as far as I understand it requires creating separate iframes for each subdomain -

http://fettig.net/weblog/2005/11/30/xmlhttprequest-subdomain-update/


Alex (ActiveWidgets)
April 30,

This topic is archived.

See also:


Back to support forum