Load Order

admin

Administrator
Staff member
Does anyone know the script to get my backgroung image to appear before anything else? I have several pages and on each the content seems to appear before the background.<br />
<br />
In perticular the intro page loads the Flash before the background. It looks funky !<br />
<br />
See Below<br />
<br />
SueJon Design (<!-- m --><a class="postlink" href="http://members.cox.net/suejon/">http://members.cox.net/suejon/</a><!-- m -->)<!--content-->You can not specify load order for images or other content.<br />
However, a trick is to create a temporary "intro" page which loads the image and then redirect once the image has been loaded. It does not have to show the image on this interim page (you can set image height/width to 1 for example). After the image has loaded the image will be cached and will appear fast on next page. <br />
<br />
I would do this on the front page only. You can even set a session cookie to flag if the temporary page has been loaded earlier and thus does not require reloading. <br />
<br />
Example:<br />
<br />
<html><br />
<head><br />
</head><br />
<body><br />
<h1>Please Wait</h1><br />
<img name="preload" src=http://www.htmlforums.com/archive/index.php/"/img/background.gif" height=1 width=1 onload="window.location.href='index.html'" onerror="window.location.reload(true)"><br />
</body><br />
</html><!--content-->
 
Back
Top