I use database to store images. So img-tags are like
<img src="viewer.php?img_id=100">
Can I use javascript/php-combination to preload images of whole site after
first page is loaded? Or does all the images get loaded again automatically
if they have dynamic urls? If so, can that behaviour be changed?
This is the typical jscript i guess:
//-------------------------
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-------------------------
So then I should write something like this(supposing that I have already
done in php a mysql_query that gets all th necessary images:
<body onload=" MM_preloadImages(<? $str="";
while($row=mysql_fetch_assoc($result)) {$str.=
"\"viewer.php?image_id=".$row['image_id']."\"," } $str =substr($str, 0,
strlen($str)-1); echo $str; ?>);"