2014
12-09
12-09
让我们再聊聊浏览器资源加载优化
几乎每一个前端程序员都知道应该把script标签放在页面底部。关于这个经典的论述可以追溯到Nicholas的HighPerformanceJavasript这本书的第一章LoadingandExecution中,他之所以建议这么做是因为:Putall<script>tagsatthebottomofthepage,justinsideoftheclosing</body>tag.Thisensuresthatthepagecanbealmostcompletelyrenderedbeforescriptexecutionbegins.简而言之,如果浏览...
继续阅读 >