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

Re: [ResourcePriorities] Blocking content resources on CSS properties

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 5 Nov 2013 11:15:06 -0800
Message-ID: <CAAWBYDCQ0Qy9TMF2yFC6AizTQmR0WmELt-JnxDCP=82-ErAHFw@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: public-web-perf@w3.org, www-style <www-style@w3.org>
On Tue, Nov 5, 2013 at 10:38 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
> Hi,
> (Please keep me in CC as I’m not subscribed to public-web-perf.)
> https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overview.html#resource-priorities-property
> In the current draft, the 'resource-priorities' CSS property applies to
> content resources such as images in the <img> element. It shouldn’t.
> Because the 'postpone' value of that properties is a "must", this means that
> the decision to fetch a resource is blocked on resolving the value of a CSS
> property, which itself may depend on fetching external stylesheets.
> There are two issues with this:
> * This introduces a circular dependency. You don’t know when you’re supposed
> to fetch a stylesheet until after you’ve applied it.
> * Some browsers speculatively parse HTML to find images and other resources
> and start fetching them as soon as possible. CSS properties may not be
> resolved yet at that point. Waiting for them introduces unnecessary delays.
> To resolve both of these issues, I suggest changing the resource-priorities
> property so that it does not apply to any "content resource" such as <img>
> but only to "CSS resources" such as background-image.
> This change does not affect functionality since the property on content
> resources is redundant with the attributes that this spec adds to various
> HTML and SVG elements.

Agreed. Browsers are *not* willing to give up their preload scanners,
which adopting the property as currently specified would require.
Content resources should be delayed with content attributes, which are

Received on Tuesday, 5 November 2013 19:15:53 UTC

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