Hello, I have a website with more images on its index page. Is there the possibility to load first the images contained in the header and just after the following ? When I refresh my website I always see that the firsts images to load are the ones down in the page.. :-( Thank you
This can be done only with JavaScript, but I don't recommended to do that. All image that you want to display later must be dynamically added with script. <head> <script type='text/javascript'> var images = new Array (["imageURL", "image_1"], ["imageURL", "image_2"], ["imageURL", "image_3"]); function LoadMyImages () { for (var i=0; i < images.length; i++) { var img = document.getElementById (images[i][1]); if (img) { img.src = images[i][0] } } } </script> </head> <body onload="LoadMyImages"> <img id="image_1" /> <img id="image_2" /> <img id="image_3" /> </body> Code (markup): getElementById, Array object