views:

17

answers:

1

I have a legacy site that has dozens of little images on it. In addition, a CSS sprite is used for a variety of styling components. My browsers are loading the CSS image after the slew of HTML images, so the styling is blocked by the number of pending HTTP requests. I really want the CSS to load first, as many of these HTML images area actually not displayed on page load.

Is there an effective way to cause a browser to load CSS background images before HTML images, or vice versa?

A: 

Is your CSS file loaded first? e.g. in your HEAD element? if so, it should queue those images before the other images in your pages.

scunliffe
Yes, the CSS is loaded in the head, so I thought it would load these first, but it doesn't comply. I've noticed that it is definitely non-deterministic, as different images will require different load times on different occasions.
jkelley