3 ms·
> Scripts without an async attribute will cause the browser to stop where it's at in the DOM and wait Sort of. The browser will keep looking for things to spe
by bzbarsky 11y ago
> Scripts without an async attribute will cause the browser to stop where it's at in the DOM and wait
Sort of. The browser will keep looking for things to speculatively download that are past the point where the DOM construction got blocked by the script. In Gecko, this actually speculatively tokenizes the HTML; in WebKit and Blink there's a separate preload scanner that doesn't do a full tokenization pass. In both, the script shouldn't block the sheet downloads starting. I'm fairly certain IE has a similar setup, but I haven't looked at their code, so can't guarantee it.
If Chrome Timeline is showing you that the script load blocks the stylesheet load, then it's either a bug in Chrome Timeline or a bug in Chrome's preload scanner; either way you should report it to them, because their intent is that it not block. Or possibly a case of running out of HTTP connections, of course, though I thought their connection limit was higher than that at this point.
> I'm curious as to what browser engine you work
Gecko. But I've spent a fair amount of time looking through WebKit and Blink sources over the years I've been doing this.