Preload Images

If you have a page with a number if images, preloading them will make that page appear to load more quickly. 
Code for preloading images requires this in the head tag:
function preload() {
  if (!document.images) return;
  var ar = new Array();
  var arguments = preload.arguments;
  for (var i = 0; i < arguments.length; i++) {
    ar[i] = new Image();
    ar[i].src = arguments[i];

Now you're ready to invoke the function. The following event handler definition does the job:

<BODY onLoad="preload('first.gif', 'second.gif', 'third.gif')">

Previous Page |Home | More Tips | Links