image download ordering

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

image download ordering

Post by malcolmboston »

I have products placed on top of a div with background-image applied to it, the filesize for that background is tiny whereas some of the images are large.

What happens currently is the browser first downloads the product image and then does the background image, i would like to have the abckground image appear first.

Anyone know how to do this?

edit: on a side note, im also preloading the background image, still not showing before the image
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Have a link we can view it at?
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post by JAB Creations »

If it's that important I would hide (though not with display: none;) the background image to have it loaded from the browser's cache. I'm not sure if this will actually allow the BG image to load first but it is what I'd try offhand.

It should be noted that Internet Explorer (all versions up to and including version 7.0 at the time of this post) illegally request any and all files that are within parent elements set to display: none;. This is a shameful waste of bandwidth especially since half of the United States is still connecting via dialup! :o
Post Reply