To preload a whole html page we can directly load a src into the layer tag for Netscape 4 and use an iframe for IE4 & 5 and NS6. At the body tah we assign an onLoad event to 'grab the src'. All that needs to be modified is the var url statement to point to whatever page you wish to preload.




var url = '';



<BODY onLoad="location.href = url;">

<H1>Page is loading...</H1>


if (document.layers)

document.write('<LAYER SRC="' + url + '" VISIBILITY="hide"><\/LAYER>');

else if (document.all || document.getElementById)

document.write('<IFRAME SRC="' + url + '" STYLE="visibility: hidden;"><\/IFRAME>');

else location.href = url;




Return to the Alchemy Index