W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: lazy loading for images via css

From: <forums@david-woolley.me.uk>
Date: Thu, 04 Jul 2013 07:55:14 +0100
To: <www-style@w3.org>
Message-ID: <18f13234e6d817762b2a92893c506f53@david-woolley.me.uk>
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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC