The first thing you should understand is that YSlow and Page Speed are not really tools that tell you how fast or slow your site is, they are tools that tell you what percentage of the possible things you can do to optimize the performance you are actually doing. If you put up 2 identical sites, one on a fast dedicated server and one on cheap shared hosting (assuming relevant configuration is the same on both), you will get the exact same score on both sites because they are identical, but most likely the site running on the dedicated server is going to be much much faster than the one on the cheap shared hosting. So these tools are not a measure of actual site performance, they measure how well tuned is a site for performance, but if you really care about actual performance you should consider that good hosting is going to have a much bigger impact on actual performance than micro tuning a site on poor hosting.
Of course with poor hosting it is probably needed even more to try and improve page performance scores, but you are only going to get a small improvement, it is like waxing a Volkswagon vs waxing a Porsche, waxing is always good but it won't make your Volkswagon go as fast as a Porsche.
Reducing Http Requests
2. In layout.master configure your ScriptLoader like this:
<portal:ScriptLoader id="ScriptLoader1" runat="server" AssumejQueryIsLoaded="true" AssumejQueryUiIsLoaded="true" MojoCombinedFullScript="/mojocombined/mysitecombined.js" IncludeColorBox="false" />
Note that IncludeColorBox="false" is another optimization, the only case where you would want to set that to true is if you are using links in your content that are intended to open with Colorbox by using the CSS class="cblink". If you are not using that functionality it is best to set it to false, it will still load Colorbox on pages that have features configured to use Colorbox such as help links or the Image Gallery.
You can self host the jQuery UI CSS and combine it into the same url with the rest of the CSS for your skin, the mojoPortal CSS Handler is already designed to combine and minify and cache CSS. See the article Self Hosting jQuery and jQueryUI for instructions about hosting the CSS files locally.
Things like the Facebook Like button, Tweet This, and Google Plus 1 button all add extra http requests that impact your score, but remember the purpose of your site is not to have the best YSlow score but to engage your users and meet your business goals. A page with no content at all will get the highest possible score but it will deliver no value to anyone. You can decide for yourself whether it is worth the extra http requests to use these social widgets.
Configuring GZip Compression for both Static and Dynamic Content in IIS 7.x
If you have direct control over your server and you are using IIS 7.x you can enable GZip compression. Click the site node for your site on the left, then in the IIS section double click "Compression", then check both boxes and click "Apply"
Setting a far future expiration for static content from the web.config file
If you look in the Web.config file you will see this commented out near the bottom of the system.webServer section:
<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
Skin Specific Stuff
Things to strive for in making custom skins
Less use of background images, combine them into CSS sprites if you can. Consider using newer CSS 3 things like gradients, and rounded corners and let down level browsers live without those things. Get modern.
Combine your scripts if you can do it without breaking them
<portal:SkinFolderScript ID="sfs1" runat="server" ScriptFileName="script.js" AddToCombinedScript="true" />
Note that the path must be relative to the root of the web site.
From a UserControl (.ascx file), you can cast the Page as mojoBasePage like this:
mojoBasePage basePage = Page as mojoBasePage;
if (basePage != null)
Last Updated 2011-07-15 by Joe Audette