[ResourcePriorities] Blocking content resources on CSS properties


(Please keep me in CC as Iím not subscribed to public-web-perf.)


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 

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.

Simon Sapin

Received on Tuesday, 5 November 2013 18:39:44 UTC