W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

Re: [whatwg] Features for responsive Web design

From: Kornel Lesiński <kornel@geekhood.net>
Date: Wed, 16 May 2012 22:22:02 +0100
To: whatwg@lists.whatwg.org
Message-ID: <op.wee6y0dlte2ec8@aimac.local>
On Wed, 16 May 2012 20:12:19 +0100, Jacob Mather <jmather@itsmajax.com>  
wrote:

> Maybe this is the better question:
>
> Why does the pre-loader matter so much?
>
> Basing the selected image off of browser width is inherently
> backwards. The content should be informed by the layout, not by the
> browser.

Browsers want to download images in parallel with a stylesheet, i.e. they  
must know which images to load *before* CSS is loaded.

This is very important to browser vendors. Google goes even as far as  
replacing the HTTP protocol to remove those kinds of delays.


In addition to that applying layout to the page may be computationally  
expensive, so it would further delay time it takes to start loading images.

And finally corner cases can lead to loops:

<div style="float:left">
<picture>
<source media="max-container-width:100px" src="200px-wide-image.png">
<source media="min-container-width:100px" src="50px-wide-image.png">
</picture>
</div>

-- 
regards, Kornel Lesiński
Received on Wednesday, 16 May 2012 21:22:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT