Re: [ResourcePriorities] Only specify lazyload on img

On Wed, Jun 26, 2013 at 12:50 AM, Simon Pieters <simonp@opera.com> wrote:
> On Wed, 26 Jun 2013 00:05:19 +0200, James Simonsen <simonjam@google.com>
> wrote:
>
>>> This is already addressed by <script async>.
>>
>>
>>
>> Blink blocks the load event on <script async>. Is that a bug? It seems
>> someone would've complained by now.
>
>
> Well, I thought so... but maybe I was wrong. The spec says
>
> "Fetching an external script must delay the load event of the element's
> document until the task that is queued by the networking task source once
> the resource has been fetched (defined above) has been run."
>
> We could of course change the spec so that <script async> does not delay
> onload, unless that breaks pages.

More than anything I would be worried about breaking author expectation.

I would also imagine that there are use cases both for "load this
script and execute it as soon as possible, but don't block parsing"
and "load this script and execute as soon as possible, but don't block
the load event".

>> http://stevesouders.com/cuzillion/?c0=hb0hfff0_1_t&t=1372197824038
>>
>> Another thought: async begins loading immediately. Lazyload may start
>> loading later at the browser's discretion.
>
> I'm not sure the spec requires async to begin loading immediately.

When else would you load it? What information does the browser have
available to make discretionary decisions?

/ Jonas

Received on Tuesday, 25 June 2013 22:55:48 UTC