W3C home > Mailing lists > Public > public-respimg@w3.org > September 2013

Re: The lazyload and postpone attribute for images

From: Marcos Caceres <w3c@marcosc.com>
Date: Thu, 26 Sep 2013 21:42:26 +0100
To: Kornel Lesiński <kornel@geekhood.net>
Cc: public-respimg@w3.org
Message-ID: <7A6551873E12413E9F238CAA1AC91258@marcosc.com>

On Friday, September 13, 2013 at 12:43 AM, Kornel Lesiński wrote:

> If you define tablet/desktop variables in <style> in <head>, then preload  
> scanner will see them and know which one matches and load the right image  
> ASAP, but if you prefer you can define those variables in an external  
> stylesheet. Neither will match until CSS is loaded, so you don't have  
> double-download — It'll automatically postpone as long as necessary.

Nice… though having to put this in the head has its drawbacks (e.g., you lose cachability across your app as there is no external resource, at least on first load) - though it might be worth it to get good performance.  

If you add them to the head, and then override them in an external stylesheet, would the browser need to reevaluate all the variables?  

Please keep us informed if the CSS WG agrees with the variables proposal. 
Received on Thursday, 26 September 2013 20:42:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:06:10 UTC