tags:

views:

112

answers:

3

In most common web browsers, are the images displayed using <image> tags loaded by asynchronous requests?

+2  A: 

Yes, they are. Typically only JavaScript is loaded synchronously.

bdonlan
preloading libraries aren't for images that are on the page when it loads - they're for images that specifically *aren't*. preloading them causes the browser to request them on page load (even if it doesn't display them), so that when the JS that makes them visible runs the browser doesn't have to go off and find them (and have the page look ugly until they're found).
DDaviesBrackett
whoops - that comment was a reply to a now-deleted comment.
DDaviesBrackett
sorry about that, I removed my comment. I was asking about the point of javascript preloading libraries. Thanks for the answer :)
marcgg
A: 

Do you mean does the browser wait until the image is received before rendering the rest of the page, or requesting further html?
Then generally yes, most browsers will render the HTML first while waiting for the images, on a fast link this might not be noticeable - but was on dialup.

Martin Beckett
A: 

Modern browsers can reflow the page, so they will load the images asynchronously.

Way back some browsers (like Netscape 4) could not reflow the page, so they would have to wait until they knew the size of each image until they could render the rest of the page. If you specified the width and height in each image tag they could load all images asynchronously, otherwise they had to load enough of each image to determine the size before they could continue to render the page.

Guffa