Image preloading: how much is too much?

uhlemeuset8

New Member
So I have my own webpage here, which is a sortable thumbnails page. The \[code\]load()\[/code\] event activates each thumbnail when the first related image is loaded. Since I'm grabbing \[code\]<img>\[/code\] tags and text content from a hidden div on the page, the thumb activation prevents the user from clicking through to a yet-unloaded image and then waiting while the preload takes place in the background.The call is pretty simple:\[quote\]\[code\]$('#content img:first-child').load(activateThumb).each(function(){ if(this.complete || this.complete === undefined)this.load();});\[/code\]\[/quote\]the \[code\].each()\[/code\] catches any cached images and manually triggers the \[code\]load()\[/code\] event. Worked great and was a fast and lean website. Now, as the site continues to grow, there are over 100 \[code\]<img>\[/code\] tags in the single HTML file and I'm wondering if there's a conventional limit that I'm approaching. Should I split the page onto 35 different html files? Should I lose the tags and the slick preloading effect in favor of a server-side request for the images on demand?What's your instinct, as a good programmer?
 
Back
Top