简体   繁体   English

在页面底部包含 JavaScript 文件

[英]Including JavaScript files on the bottom of the page

在页面底部加载 JavaScript 文件真的有助于加快页面速度吗?

Yes, it does.是的,它确实。 Assuming you implement it correctly.假设您正确实施它。 It allows the rest of your markup to render before it tries downloading the file.它允许在尝试下载文件之前呈现其余的标记。 As Paul Irish said, "Friends don't let friends put script tags in the head"正如保罗爱尔兰所说,“朋友不会让朋友把脚本标签放在脑子里”

Additional Resources:其他资源:

Yahoo Developer Network 雅虎开发者网络

Google Developers谷歌开发者

Another Google Developers Article 另一篇 Google 开发者文章

Ilya Grigorik 伊利亚·格里戈里克

Jake Archibald Tweet 杰克·阿奇博尔德推特

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM