hi Dear RamiroS , sometimes the all page loaded in users page but image stuck or not loaded in user's browser , that why i need it
Yeah, but in that case it may be the code is messed up, not light. Are you using css? unless the visitor has a really bad connection images should load. Always. Images are just part of the code like text.
Also if you are trying to reload images with js it may bring new problems. I would suggest to focus your efforts on knowing why the images do not display since it is not a common issue.
Dear ardav ,
i have tried the code and i inserted it in .js file and put it in the head , but it doesn't work , is there something missing or something wrong should i fix to make it work ?
Thanks Dear almostbob
but i don't mean to reload over and over , i just needed to be load just IF it doesn't loaded at first time because of many thumbnails images are already downloading and maybe some of them messed up
Can't really help - js ain't my thing - I've only got a jobber's understanding. The script I mentioned has a reload limit set to 5, so that should avoid an infinite loop, but as for why it doesn't work - no idea.
Does it work in Firefox? I think the script may be for Greasemonkey - you can download it for FF. However, I don't think it will work for IE etc. There is a Greasemonkey for IE here: http://www.gm4ie.com/
I think this may be taking things to extreme though. As RamiroS/AlmostBob state, images not displaying is strange. Is it due to the fact that they are large images? How about optimising them (reducing the filesize)? If the images are png files, converting them to either gif or jpg may help.
If you've got a slow connection and are trying to view an image-heavy page, the page should load by the end - it just takes time. If you've got a js script to do the image loading - this may be your problem. CSS images and <img> images should load.