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

Re: [whatwg] <img srcset> for responsive bitmapped content images

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 10 May 2012 13:22:52 -0700
Message-id: <C55E9FE6-E834-404C-B11B-DED7DAFA76EB@apple.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: whatwg@lists.whatwg.org

On May 10, 2012, at 7:26 AM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 5/10/12 10:19 AM, Mathew Marquis wrote:
>> Hey guys. Don’t know if it’s too early to chime in with this, but we were told by some members of the Chrome team that any browser that supports DNS prefetching — including assets — wouldn’t consider “looking-ahead” on the img tag as an option.
> Why not?  In any case, _DNS_ prefetching would be the same for both the low-res and high-res image, I would think.
>> The original src would be fetched in any case, saddling users with a redundant download.
> That sounds like image prefetching, not DNS prefetching.  I see no obvious reason it couldn't look at multiple attributes.

Indeed. I'm reasonably familiar with WebKit's preloading code and I see no reason it couldn't look at the srcset attribute. This would work fine for scale factor selection. Unfortunately, it would not work for the suggestion to have srcset pick images to fit available space based on width and height. Available space is not known until layout time, which happens too late for preloading decisions. So width/height fitting would defeat prefetch, regardless of specific syntax used.

Perhaps this is what the Chrome engineers were thinking of; hard to say without more detail.

Received on Thursday, 10 May 2012 20:23:53 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:42 UTC