CSS: Should I pre-load images ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

In CSS I have this entry:

.someelement:hover {
background-image: url(smilie.gif);
background-repeat: no-repeat;

Does it do any good performance-wise to pre-load the image for this purpose


Re: CSS: Should I pre-load images ?

RobertTG wrote:
Quoted text here. Click to load it

Preloading *may* help, but depends on your server and if it is sending
out the right expiration stamps on your images I suppose. Just as with
any other image you could use javascript to preload the images. I dont
think it matters WHERE the images are used (CSS or HTML) - so long as
they get downloaded before you need to view them, when your CSS ref's
the image it'll grab the one from cache rather than go back out to the

Re: CSS: Should I pre-load images ?

Quoted text here. Click to load it

Probably looks better on slow connections. You might consider an outside
viewport element which preloads.

John                       Perl SEO tools: http://johnbokma.com/perl/
                 Experienced (web) developer: http://castleamber.com/
Get a SEO report of your site for just 100 USD:

Site Timeline