JavaScript on the bottom of the page?

后端 未结 4 454
野性不改
野性不改 2020-11-28 12:50

I\'ve read that it is better to keep all of your JavaScript files on the bottom of the webpage. The HTML5 Boilerplate template seems to agree: http://html5boilerplate.com/

4条回答
  •  执笔经年
    2020-11-28 13:28

    We recently had this debate at the office. I wrote a lengthy post where I lay down my opinion on the subject. The short answer is that it really depends on what you're making. For content oriented web pages, bottom placement seems to work best. However when one is creating web applications where functionality is the main priority, placement at the top has it's advantages.

提交回复
热议问题