Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The document.write method makes it impossible to do async script loading, that you ordinarily could do here to improve perceived page load time. No?

I mean, for instance, you couldn't load that FIRST CDN jquery as async, because you need the browser to block on it so your NEXT script tag (which also can't be loaded async, naturally, cause it has a document.write in it) can check to see if it was loaded.



Yes, that first method is hideous. Async is a necessary speedup and the `if (jQuery) ` slaughters that optimization.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: