Re: [resource-hints] Resource de-prioritization?

Hmmm great point. I want to think about that for a bit to understand how
preload could fit in. This sort of gets to "things that are attributes are
scannable, so optionality would ideally be scannable", maybe?

On Fri, Dec 5, 2014 at 12:10 PM, Yoav Weiss <yoav@yoav.ws> wrote:

> On Fri, Dec 5, 2014 at 7:53 PM, Nat Duca <nduca@google.com> wrote:
>
>> As far as images go, we could also say that the only reason we need hints
>>> to lazyload images is the fact that Web compat requires image download
>>> before onload. Authors could also provide a page-wide hint to say "I don't
>>> care about images in my onload. You, the browser, can lazyload everything,
>>> if you find it helpful".
>>> That would complicate life for the preloader (no notion of viewport
>>> there, so no idea which images are visible), but the download queue could
>>> then use heuristics to download only the first X images, and wait for
>>> layout for the rest, etc, etc. The browser is in a better position to do
>>> that.
>>>
>>
>> I was wondering if we had optional elements, then lazyloading of images
>> would "just work": when an element is optional, its subtree is optional.
>> Then under that subtree, we change the semantics of onload.
>>
>
> Interesting.
> A downside to that approach is that the preloader in Blink & WebKit has no
> notion of a tree (it just looks at HTML tokens as they pass by), so it'd
> have a hard time keeping track of subtrees. That's probably manageable,
> assuming the HTML is not broken, but when it is broken, we'd have some
> misses. Not sure how bad that would be.
>

Received on Friday, 5 December 2014 21:06:11 UTC