开发者

Why Rails doesn't include the Javascript files at the bottom of the HTML page by default?

I read here that it is better to include开发者_如何学Go Javascript files at the bottom of the HTML page.

Why Ruby on Rails doesn't do so 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. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜