Since i discovered the concept of non-blocking scripts i have become obsessed with loading all my external scripts this way. I have even hacked Joomla! templates(which i know is a bad practice) in order to load non-blocking scripts in the index.php file. Example code below.
(function() {
var script = document.createElement( script ), head = document.getElementsByTagName( head )[0];
script.type = text/javascript ;
script.src = "http://www.mywebsite.com/scripts/one_of_many.js"
head.appendChild(script);
})();
我的问题是:
装载非锁定的文字是好的/坏的?
使用非锁定的文字应当有什么样的限制?