Set your headers, gzip content, and split assets across domains, yes, but - "Your pages will load faster with Rails"? Somehow the headline doesn't seem appropriate.
Set your headers, gzip content, and split assets across domains, yes, but - "Your pages will load faster with Rails"? Somehow the headline doesn't seem appropriate.
Same with far future expires. If you just set your headers to the far future, you'll be stuck with outdated content on the client that you can't control. If you use Rails, without doing a single additional thing, your asset URLs come prebaked with cache-busting behavior that operated in the background with no additional work by you.
Whether or not Rails makes it easy to implement these suggests or if another framework makes it harder/easier is another discussion.
I would also say the title is very presumptuous; claiming to make all pages load faster is an unachievable goal & clearly an exaggeration.
Looking at http://www.alexa.com/topsites for example, which of those would you think Rails could make faster?
All of the speedup suggestions outlined in your article can also be handled easily - easier than Rails or not, I don't know - in other languages and frameworks as well. There is nothing about any of these items that only Rails can handle - heck half of them don't even have anything to do with your choice of server-side frameworks.
The main point of your article is "How Rails can make it easy to make your pages load faster".
No, it is not. This is a claim which is testable and measurable, and for reasonable assumptions, you can predictably, measurably, and in a reproducible fashion improve page load times by implementing the YSlow recommendations.
If you have the following line of code in application.rhtml:
javascript_tag "prototype", "scriptaculous", "shopping-cart", "color-picker", "mysite-functions"
and you add these 16 characters
, :cache => true
then every page on your site now loads faster.
P.S. Explanation for non-Rails users: the above code causes the five specified Javascript files to be concatenated into "all.js" the first time any page on the Rails site is rendered, and all pages load all.js rather than loading the five Javascript files. This cuts the overhead of four HTTP request/response cycles from the page. It gives an obvious, measurable impact to page load times, and plays well with another braindead easy optimization "set your HTTP server to gzip outgoing textual content (including Javascript)".
A simple config for multiple resource domains is nice; but I'm not a fan of helper functions. javascript_include_tag just isnt as clear as <script src="/location/of/file"></script>
There's a lot of additional help that a framework can offer for the client-side if you use its helpers, and that help can be tuned over time as the best practices themselves get refined.
Too many alternative domains and you will get a new warning from yslow. Every time you pull from a new domain, this will incur a dns lookup, might even end up with the page going slower because them.