Re: lazy loading for images via css

On 03.07.2013 23:31, Felipe Nascimento de Moura wrote:

> As I said, the defer attribute would already help a lot...I am just
> not sure if this is all we can do about it. If there would be any
> other interesting, useful thing to do related to it, I think this is
> the moment to discuss :)
>  
>

As I see it, the main issue here is not whether the problem exists, but 
wherher it falls within the remit of style sheets.  Some cases may 
better by handled by browsers being more clever about ensuring that they 
load visible images before ones that will be fully outside the viewport, 
without the need for extra hinting.  Othere cases may require extensions 
to HTML to add additional attributes to img and similar elements.

However, a couple of things you should check are:

1) that you are not trying to send cookies with all your images, or 
even worse, sending cache control headers that prevent caching (sending 
cookies with images is a very common mistake and problems with stale 
cosmetic images can be avoided by changing the image name on each 
re-styling of the page.

2) that you are you providing image display size information in the img 
element opening tags.  At least at one time, having that information 
allowed browsers to layout the page and start rendering before all hte 
images had loaded.

Received on Thursday, 4 July 2013 06:55:37 UTC