[英]Why Rails doesn't include the Javascript files at the bottom of the HTML page by default?
I would guess that Rails includes your application.js
in the <head>
by default because it assumes you'll be minimizing things via the asset pipeline. 我猜想Rails默认包含你的application.js
在<head>
,因为它假设你将通过资产管道最小化事物。 There's no need to worry about where your script is included if it's a single external file being loaded in parallel by a single HTTP request. 如果单个HTTP请求并行加载单个外部文件,则无需担心脚本的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.