Ilya Grigorik has published a post about how script-injected resource loading could negatively impact performance, in Script-injected "async scripts" considered harmful.
The example in the article shows a CSS download blocking script execution, where the scripts are short snippets that inject additional
If you look at the source to DailyJS you can see Disqus injecting a script that way, and when I look at the network tab in Chrome Developer Tools it seems like
count.js executes after the CSS files have downloaded.
The obvious fix is to use
async attributes on
script tags, as long as you can live with the additional effort to support IE8 and 9. But before you rush off to reformat your sites, the last point by Ilya is interesting:
<head>lean to allow the browser to discover your CSS and begin parsing the actual page content as soon as possible - i.e. optimize the content you deliver in your first round trip to enable the fastest possible page render.
Optimising for all possible browser behaviours is difficult!