I was in chapter 5 of the Ruby on Rails, and I come across "Asset pipeline" when R-o-R detect and jam all css and js files into one.
Bundles are quite common now. Even for non Rails-ists.
It's true that Browser will have to make less requests, but at the same time, the browser will potentially have to process more code than it should?
It's true it will make less requests, it's false that it will require more processing, it will require the same amount of processing whether split up into 10 requests or 1. That is if we discount all the other processing that happens before and after the parsing of your sources.
For example, I use a slider jquery plugin in gallery page, since R-o-R fuse the plugin with all other js files into 1 javascript.js, the plugin will be included in about page, home page and so on...
You can create separate bundles that don't include everything, application.js should give you an example on your first install, and even if it does not the source that is there is pretty self explanatory if you ask me. And even if you just drop it from the bundles period you can still require it individually by hitting up /assets/name.js.
Can I import separated files for separated pages? and how?