<a href="https://github.com/walmartlabs/little-loader" rel="nofollow">https://github.com/walmartlabs/little-loader</a> is smaller (519 bytes min+gzipped), supports IE8, and fires either on script load or on error synchronoulsy (so that globals won't be overwritten by code that runs between script loading and the callback firing). The thing is tested on SauceLabs down to IE8.<p>The drawback is a lower level API, and it is JS only. AFAIK loading CSS consistently cross browser is also a mine field if you want consistent error handling.<p><pre><code> window._lload("http://example.com/foo.js", function (err) {
// `err` is script load error.
// otherwise, foo.js is loaded!
}/*, [optional context (`this`) variable here] */);</code></pre>