
Originally Posted by
cr3
This is a very bad idea. Though this is not widely known, it should be. The problem is that it causes a memory leak. After the page is loaded a number of times or after a number of pages that use this strategy are loaded, so much memory is orphaned until the entire session is closed that it can adversely affect cpu performance on the client's machine! There is an alternative method. Simply add galleryimg="no" as an attribute to each image (only images of a certain size would even need it), ex:
HTML Code:
<img galleryimg="no" src="some.jpg">
If you have a ton of images, this script can do that job:
Code:
<script type="text/javascript">
onload=function(){
var imgs=document.images;
for (var i_tem = 0; i_tem < imgs.length; i_tem++)
imgs[i_tem].galleryimg='no'
}
</script>
Bookmarks