Re: [ResourcePriorities] Blocking content resources on CSS properties

On 11/5/13 2:19 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Tue, Nov 5, 2013 at 1:37 PM, Bruno Racineux <bruno@hexanet.net> wrote:
>> On 11/5/13 10:38 AM, "Simon Sapin" <simon.sapin@exyr.org> wrote:
>>>* 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.
>
>You're missing the point of the argument.  The mere *existence* of
>this property, with its current definition, means that browsers have
>to throw their preloaders away.  They can't use them at all, not if
>external CSS can come along, seconds later, and declare that an image
>shouldn't be loaded yet.
>
>At the time the preload scanner is running, the browser has no clue
>whether the image is in the viewport, or what its 'display' value is.
>It has, roughly, the same information available to Media Queries, and
>no more.
>
>This criticism applies to both non-initial values of 'resource-priority'.

I understand it's a caveat that you cannot apply the 'resource-priorities'
css property on initial load of the document. The logic goes that
'attributes' are the ones suited here for that particular context.

But it seems still beneficial to have such property for 'content
resources' as currently defined, when it comes to ajax or dynamic content,
where your css stylesheet is preloaded already. (I don't see or think the
preloader have any effect at that point, yet it is my assumption the
resource priority mechanism can probably still work in that context)

If so, I see don't see a critical need to remove 'content resources' as
much as addressing the caveats, and making a mention that 'preloaders'
will ignore css properties on initial load.

Received on Wednesday, 6 November 2013 00:18:28 UTC