Multiple hosts for assets in Rails
- One other quick win Rails 2.0 will give you is multiple hosts for assets. Browsers will only have two concurrent connections open for any single host, but an easy way around that is to use multiple subdomains that resolve to the same domain. [...]
- config.action_controller.asset_host = ‘assets%d.YOUR_DOMAIN.com’
- Now, if your page has lots and lots of assets (javascript includes, linked stylesheets, images, and so forth) page download times will decrease when you’re able to fool the browser into thinking it’s talking to multiple hosts (which, again, get 2 concurrent requests each), while it is in fact only talking to a single host. [...]