Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Images preload issue

Started 1 month ago by paquito
Hello, I've some javascript code which preload the images for a photo gallery made of clickable thumbnails and the images to be shown. The script is structured to preload the images in order to have a smooth experience while browsing through the thumbnails but, as the images are needed in quite high quality and can't be compressed any further, the page is too slow to load. Basically, as the...
Site: SitePoint : New Articles, Fresh Thinking for Web Developers and Designers  SitePoint : New Articles, Fresh Thinking for Web Developers and Designers - site profile
Forum: JavaScript  JavaScript - forum profile
Total authors: 2 authors
Total thread posts: 7 posts
Thread activity: no new posts during last week
Domain info for: sitepointforums.com

Other posts in this thread:

markbrown4 replied 1 month ago
Hi paquito, and welcome to Sitepoint I generally wouldn't pre-load images in a gallery like this as it would require more bandwidth. but the trick would be to load the images not in the page after it's finished loading. If 1.jpg is already in the page it can be removed from the pre-load script. You should also always be on the lookout for places where you can reduce the code. ...

paquito replied 1 month ago
Hi Mark, Thanks for your kind reply. The reason why I decided to preload the images is because each image is around 100K and it wouldn't display quickly enough clicking on each thumbnail. Do you think there is a way to preload the images within the html code, not as javascript and then send them to the javascript for display? What I'm having in mind is something similar to the ...

markbrown4 replied 1 month ago
Hi, Did you try the code above? it should pre-load the images 2-25 after the page has finished loading.

paquito replied 1 month ago
Hello, I've solved the problem putting the javascript for the photogallery at the end of the page, allowing the browser to display the contents of the page and then load the pictures into the gallery. In this way the user doesn't look at a black page for 10 seconds. Thanks for your useful tips paolo

paquito replied 1 month ago
I've put it exactly as it is and the gallery stops working. When I click on the thumbs nothing happens anymore. I've got a dilemma: in the preloadimage(); bit, have I to put the list of pictures or leave it as it is? Cheers p PS: part of the code I quoted on my 1st post is incorrect. As you surely have guessed the second part is relative to a function to load other images, nothing to ...

markbrown4 replied 1 month ago
Can you please post the whole source code in the page? My script should do exactly what that is doing but load the image after the page loads.

 

Top contributing authors

Name
Posts
paquito
4
user's latest post:
Images preload issue
Published (2009-11-12 07:11:00)
I've put it exactly as it is and the gallery stops working. When I click on the thumbs nothing happens anymore. I've got a dilemma: in the preloadimage(); bit, have I to put the list of pictures or leave it as it is? Cheers p PS: part of the code I quoted on my 1st post is incorrect. As you surely have guessed the second part is relative to a function to load other images, nothing to do with our issue. Therefore the code to consider...
markbrown4
3
user's latest post:
Images preload issue
Published (2009-11-12 16:39:00)
Can you please post the whole source code in the page? My script should do exactly what that is doing but load the image after the page loads.

Related threads on "SitePoint : New Articles, Fresh Thinking for Web Developers and Designers":

Related threads on other sites:

Thread profile page for "Images preload issue" on http://www.sitepointforums.com. This report page is a snippet summary view from a single thread "Images preload issue", located on the Message Board at http://www.sitepointforums.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity