[whatwg] Proposal for separating script downloads and execution

Boris Zbarsky bzbarsky at MIT.EDU
Thu May 26 09:07:56 PDT 2011


On 5/26/11 11:56 AM, Nicholas Zakas wrote:
> Sorry for repetition, but we can already preload images and CSS and apply them to the page at an arbitrary point in time. Why wouldn't we want the same thing for JavaScript?

I think the question is whether you want _more_ than that for JavaScript.

For images, you can preload them and choose when they're shown, but 
_cannot_ choose when they're decoded.

For CSS, you can preload it and choose when it's applied but _cannot_ 
generally choose when it's parsed.

For JS, you want to be able to preload it and control when it's executed 
(in the sense that the side-effects it causes become visible).  The 
question is whether control is also needed over exactly when 
side-effect-free preprocessing of the script happens.

-Boris



More information about the whatwg mailing list