W3C home > Mailing lists > Public > www-style@w3.org > July 2013

Re: lazy loading for images via css

From: Simon Sapin <simon.sapin@exyr.org>
Date: Mon, 01 Jul 2013 19:40:20 +0100
Message-ID: <51D1CD14.5030009@exyr.org>
To: liam@w3.org
CC: "Tab Atkins Jr." <jackalmage@gmail.com>, Felipe Nascimento de Moura <felipenmoura@gmail.com>, Bjoern Hoehrmann <derhoermi@gmx.net>, www-style <www-style@w3.org>, brice@websailors.fr
Le 01/07/2013 19:26, Liam R E Quin a écrit :
> On Mon, 2013-07-01 at 10:18 -0700, Tab Atkins Jr. wrote:
>
>>> I wonder if an alternative would be an on-demand( <url> ) function that
>>> could go anywhere that url() can go today? Then it could work for
>>> sounds, or other resources.
>>
>> Yes, this is another direction we could take.  Only issue I have with
>> this is that the most common case for urls in CSS is images,
> Right.
>
>> We could do both, treating the defer as a property of the url, such
>> that applying it via either method works, even when combined.  Or we
>> could just do images for now, and wait for demand for other types of
>> urls to add the more generic solution?
> I don't have strong feelings, just wanted to make sure the more generic
> version was considered. I do think we'll see more resource types in the
> future but supposition can't get in the way of practice.
>
> For the background image example you give, I can imagine having only
> some images as marked "defer", e.g. that are likely to be off-screen
> before scrolling. But maybe that's not necessary, marking them all as
> defer would be sufficient, since the browser can't actually tell which
> ones it needs and when until it knows their sizes.

Also: images are deferred until they are scrolled into view, but it may 
not be as obvious to define what "defer" means for other types of resources.

-- 
Simon Sapin
Received on Monday, 1 July 2013 18:40:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:31 UTC