W3C home > Mailing lists > Public > public-web-perf@w3.org > November 2013

Re: [ResourcePriorities] Blocking content resources on CSS properties

From: Bruno Racineux <bruno@hexanet.net>
Date: Tue, 05 Nov 2013 13:37:15 -0800
To: Simon Sapin <simon.sapin@exyr.org>, <public-web-perf@w3.org>
CC: www-style <www-style@w3.org>
Message-ID: <CE9E9D29.78B18%bruno@hexanet.net>
On 11/5/13 10:38 AM, "Simon Sapin" <simon.sapin@exyr.org> wrote:
>
>https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/ResourcePriorities/Overv
>iew.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.

That is for the dev who uses this property to manage. I much prefer to
deal with this caveat, that having to fight a 'preloader' doing things I
don't want it to do.
The whole point of lazy-load is to put the tools in the developers hands.


>* 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.

Delaying is the whole point here. The spec says:
"until [...], or the element has been styled such that its display
property is no longer set to none."

That does not mean 'postpone' rely only on the css display property to
show.
It only means that 'display:none' is a mean to keep 'postponing' "until
either the bounding box of the element is inside the User Agent's
interpretation of the Document's viewport". i.e. CSS properties do not
have to be necessarily resolved prior.
Received on Tuesday, 5 November 2013 21:37:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:37 UTC