Why you should avoid using document.write for scripts injection
About time. Just do as Google/Facebook do:    var _script = document.createElement('script');

    _script.src = '//blablabla.bla/bla.js';

    /* _script.async = '' */

    (document.body || document.getElementsByTagName('body')[0])
      .appendChild(_script);

You could append to the head instead (a la Google Analytics universal snippet) with the async attribute set to '' or 'async' or true or !0 or whatever you fancy.Works for CSS too, though it'd be better to append your link element to the head despite what Google says.Handy for asynchronously loading fonts without link rel="preload" which is poorly supported.You could also do this with a single style element in the body containing your @font-face, but that's a crap idea if you want to use Google Fonts, for instance.Obviously with CSS, it's worth including a regular link element in a noscript in the head.