开发者

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

开发者 https://www.devze.com 2023-04-08 02:38 出处:网络
I read here that it is better to include开发者_如何学Go Javascript files at the bottom of the HTML page.

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

精彩评论

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