I have a website where all the pages have lots of images inside them. Each image is generated dynamically by PHP (I mean that the src="" attribute of the img tag is something like "/image.php?id=4553").
I am controlling the cache properly to speed up the loading of the same image more times and the time it takes to load a single image is very quick. The problem is that the first 5-6 images are loaded in the same time the page loads, the others are loaded MANY SECONDS later (5-10-15 seconds later). Firebug tells me that the problem is due to the queueing of the requests the browsers perform in order to limit simultaneous connections to the server.
I tried sending a "Connection: Keep-Alive" header when I send the HTML of the page, but maybe it's not enough!
Any help?
I know there are jQuery plugins such as lazy load that load images only when they're visible on the viewport. That would be a nice "workaround", but I'd like to know if there's any PROPER way of controlling this type of image loading.
Thank you very much.