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

On Mon, Dec 1, 2014 at 9:35 PM, Aaron Gustafson <>

> In April of last year, Jake brought up the "defer" attribute for images
> (and other resources).
In reading the Resource Hints draft, the concept of lazy loading or
> allowing the browser to determine the loading process, but to be aware of a
> low-priority resource seems to have been lost. It was part of the
> now-abandoned Resource Priorities draft (defer, lazyload).

I agree that the need for such de-prioritization/lazy-loading is still
here. There are many large-scale sites that are using various JS based
mechanisms in order to avoid loading all of the site's images.
These mechanisms are often invasive, as there's no proper way to get
notified regarding an element's visibility (or the fact that it's *about*
to become visible). They also tend to ignore the radio characteristics,
where a native solution could take advantage of that (e.g. download
everything on a good radio network to avoid draining the battery, assuming
a user pref indicates BW is cheap, etc).

Also - as part of the Element Queries discussion, we may need a way to
signal the parser that a certain image's download should not start before
layout took place (since it is part of an EQ based layout, and its
dimensions depend on the final layout, and cannot be hinted using a `sizes`
like mechanism).

So, I would very much like to see the discussion of such de-prioritization
hints resumed.

> The Resource Hints draft seems to focus entirely on prioritizing assets
> and domains (which is understandable), but does not seem to offer an option
> for de-prioritizing assets.

I don't think that Resource Hints is the place for such de-prioritization.
Resource Hints are designed to let the browser know of resource URLs as
soon as possible, whereas in this case, it's not needed.

> Are we to assume that deprioritization would be the default behavior if
> prioritization instructions are provided

No. The hints are not mandatory. Assuming they are would slow down existing
Web content.

> In not, where are we at with respect to a declarative de-prioritization
> instruction?

Good question :)

Received on Wednesday, 3 December 2014 12:06:20 UTC