Re: The lazyload and postpone attribute for images

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