Reputation: 171321
I read here that it is better to include Javascript files at the bottom of the HTML page.
Why Ruby on Rails doesn't do so by default ?
Upvotes: 10
Views: 1647
Reputation: 239230
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.
Upvotes: 8