[EMAIL PROTECTED] wrote:
> Hey guys,
>
> I'm building a web app and am hoping to minimize the images loaded per
> page.  I like the way YouTube only loads the thumbnails of the images
> you can see and then waits till you scroll before loading any others.
> They do this by placing <img /> tags for the initial images and then
> use javascript to fill out the rest.  The only problem with this is
> someone without javascript won't see any of those additional images.
> So my question, and thought, was to do something like this:
>   
This looks like a question for the Rails-Spinoffs group.

A simple unobtrusive approach would be to have a "drawer" of thumbnails 
with a link to view more images.  For JavaScript enabled browsers, 
simply override the functionality of that link to load a list of image 
locations from memory or by AJAX.

An image will be downloaded by the browser anytime 1) it parses an <img> 
with a src attribute, 2) an <img> node  with a src attribute is added to 
the DOM via JavaScript, or 3) any existing <img> has its src changed via 
JavaScript.  This should be standard across all browsers.

As a developer, you should be able to control when images are loaded by 
keeping these three in mind.  Note that browser image caching rules 
apply according to the HTTP headers sent with the image.

--Ken Snyder

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to