Re: [ResourcePriorities] Blocking content resources on CSS properties

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