[whatwg] comments on SCRIPT ASYNC and DEFER

Steve Souders whatwg at souders.org
Wed Feb 10 10:28:30 PST 2010


In the current text, it says "must then be fetched". In my suggestion I 
say "should not start until after parsing". Saying "should" instead of 
"must" leaves the opening for browsers that feel they can fetch 
immediately without negatively impacting performance.

-Steve

On 2/9/2010 6:39 PM, Boris Zbarsky wrote:
> On 2/8/10 4:54 PM, Steve Souders wrote:
>> 4. "If the element has a src attribute, [snip] the specified resource
>> must then be fetched, from the origin of the element's Document."
>> If the script has DEFER, the request should not start until after
>> parsing is finished. Starting it earlier could block other
>> (non-deferred) requests due to a connection limit or limited bandwidth.
>
> Shouldn't this be left up to a UA?  I can see a UA with high enough 
> connection limits being willing to use some small number of those 
> connections for deferred scripts even before parsing is done.  The 
> alternative might end up being for the network to be completely idle 
> while a bunch of parsing happens followed by a flurry of deferred 
> script loading activity....
>
> -Boris




More information about the whatwg mailing list