How to preload your web image?

In one of my website, when user hover his mouse on a menu image, the image is replaced by a hover menu image. This cause  minor performance lag, because when the user hover his mouse, the image has to be reloaded.

There have been many ways of preloading images to prevent this lag.  One elegant way of doing this is by using css. You have to add your css file :


.preloadimage { display:none; }

 , and add to your html/php code: 


<img src=”images/pic1.jpg” class=”preloadimage” />

Related posts:

  1. Fast load image tips
  2. Create a watermark image
  3. Profit from image hosting – part 2
  4. Profit from image hosting – part 1
  5. How to protect your images being taken

1 comment(s)

  • Aug 19, 2010 by neil from web design liverpool

    preloading images is vital, very useful tip this as it prevents waiting for images to cache. until now id always done this using javascript, didnt know css could do it!

  • Any feedback from you?

    This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Sep 9, 2008 by

Want to set up your own web server at home? Read this guide

Super Green Hosting HostGator GreenGeeks WP Web Host green web hosting ad