Javascript non-blocking scripts, why don't simply put all scripts before </body> tag?
问题 In order to avoid javascript to block webpage rendering, can't we just put all all our JS files/code to be loaded/executed simply before the closing </body> tag? All JS files and code would be downloaded and executed only after the all page has being rendered, so what's the need for tricks like the one suggested in this article about non blocking techniques to load JS files . He basically suggests to use code like: document.getElementsByTagName("head")[0].appendChild(script); in order to