[whatwg] Deferring image load

On Mon, 13 Feb 2012 14:59:09 -0000, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> Well, UAs would fetch the images to be displayed first first, and then
>> prefetch images until they have more than a screenful of undisplayed
>> content loaded.
>
> What does "screenful of undisplayed content" mean for some slide-deck  
> site that just moves images in and out of view via script?
>
I would /expect/ such sites to use a static set of <img>s dynamically  
pointed to prefetched <link rel=prefetch> images. With emphasis on expect.  
Opera devs should be more knowledgeable on the compatibility problems this  
raises, considered they have partly backed out of deferring image loading  
already.

> Not knowing the size makes it _impossible_ to do layout correctly.  
> Again, UAs would only be able to skip getting images that have explicit  
> height and width attributes.
>
On the contrary, if you've laid out two screenfuls you can guess that  
anything after that will not be in the aforeoutlaid* screenfuls.

> And even then, things could be troublesome if the pseudo-clases for  
> detecting loading state are added, since those could affect layout...
>
As I say, there are numerous compatibility problems. If image dimensions  
late in the document affect the layout of a previous part of the document,  
as you seem to hint at, then hell is loose if we don't know them. Guessing  
would be most unfortunate and surprising to layout designers.

* Well, the word does at least conform to the grammar of my native  
language :/
-- 
-,Bjartur

Received on Monday, 13 February 2012 10:52:56 UTC