Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Does webpage loading also load unused images from the CSS? Re: Does webpage loading also load unused images from the CSS?

#71144
Chris Coyier
Keymaster

I think the question is :

Code:
#div-on-current-page {
background: url(image.jpg);
}

#div-NOT-on-current-page {
background: url(image-different.jpg);
}

So for the current page, will it load image-differnet.jpg, or not? Indeed it is an interesting question. I’m fairly sure it does NOT load the image if it doesn’t need it.