4 ms·
Or as simple as <script defer async src="blah"></script> for purists <script defer="defer" async="async" src="blah"></script>
by ck2 15y ago
Or as simple as
<script defer async src="blah"></script>
for purists
<script defer="defer" async="async" src="blah"></script>
- DanielRibeiro 15y agoMore about which browsers support this, its origins, and the specs: http://stackoverflow.com/questions/1834077/which-browsers-support-script-async-async http://stackoverflow.com/questions/1834077/which-browsers-su...
- ck2 15y agoAlmost all modern browsers (including IE which invented it) support DEFER. The two most popular browsers support ASYNC going back to versions from September 2010, Chrome 11+ and Firefox 3.6+
- devmach 15y agowith using someting like headjs, you have some pros : - you don't have to put tons of <script> tag on your template. just pass the parameters to headjs* - you can load js files and "after" run some function and this function hasn't have to be in another js file or document.ready(). you can do this operations any time after full page load. * Ok, i know : one should compress and merge javascript files..