Re: lazy loading for images via css

Yes, that's true, although most of(if not 99%) implementations "out there"
do it the bad way :/
Brice Parent gave another interesting idea, of using
async="none|async|postponed|..." in loadable elements(such as images,
object, video, iframe...) as an attribute, like
<img src="photo.png" alt="photo!" postponed/>

In this case, I believe we should discuss it with HTML list's people, right?

Also, it would be really interesting to use as another background
as proposed by Sebastian Zartner.
background-image: url(mygreatestphoto.jpg) postponed;
background-load-method: postponed;

With that, we would even be able to say that: div{
     background-load-method: postponed;

this way, a server side application could write the body tag with or
without the "mobile" class, therefore, all the div elements with background
images would be postponed to load their background.


On Fri, Jun 28, 2013 at 8:01 AM, Bjoern Hoehrmann <> wrote:

> * Felipe Nascimento de Moura wrote:
> >I mean, nowadays websites use it to avoid unnecessary image loadings...but
> >they sacrifice(a lot of) the performance! It's a javascript running for
> >each scroll event, usually running through all the images in a loop to see
> >which ones are in the current visible viewport! (it is terrible or is it
> >just me?!)
> That certainly would be terrible if so, but I do note that this could be
> optimised considerably easily. For instance, a Quadtree could be used to
> limit the number of images in the inner loop.
> --
> Björn Höhrmann · ·
> Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
> 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 ·

*Felipe N. Moura*
Senior Web Developer

 Twitter:    @felipenmoura <>

Meet some of my projects:
BrazilJS Conference <>  |  BrazilJS
|  Power Polygon <>  |
TheWebMind<>  |
LinuxUser #508332
*Changing  the  world*  is the least I expect from  myself!

Received on Friday, 28 June 2013 21:48:16 UTC