Bug 51650

Summary: Implement HTML5 Suggestion to Pre-fetch Script URL's Upon SRC Assignment
Product: WebKit Reporter: Will Alexander <serverherder>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: ap, getify, ian, koivisto
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://digital-fulcrum.com/webperf/orderedexec/

Description Will Alexander 2010-12-27 11:36:35 PST
Recent activity to support parallel-loading dependent scripts lead to nightly builds including support for setting `async=true` on script elements to insure they execute in the order in which they are inserted. WHile this solves the immediate use-case, this behavior is not in the specification.  Moreover, this does not address teh use-case of pre-fetching scripts and defering their execution. 

Step 12 of the HTML 5 "Running a script" section (http://www.w3.org/TR/html5/scripting-1.html#running-a-script) makes the following suggestion: 
For performance reasons, user agents may start fetching the script as soon as the attribute is set, instead, in the hope that the element will be inserted into the document. 

This behavior is entirely sufficient to support both pre-fetching and ordered execution.  It is currently implemented in IE 4+.