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.
精彩评论