The westernaustralia.com site is served to users all over the world from the most remote city in the world: Perth, Western Australia. In other words, we target users in core markets across Australasia, Europe, and North America and while we expect a consistent homepage load time below ten seconds in all cases, Perth to New York, Perth to London, and, really, Perth to anywhere equates to high latency, congestion, and poor response times. Couple that with SharePoint, a rich, interactive site design, and an excessive number of page requests and you'll begin to appreciate why we chose to serve the site across Akamai's content delivery network.
I'll describe the setup in detail someday but for now, I've finally managed to convince YSlow the site is being served using a CDN; while we use better tools for global performance measurement (Gomez), seeing a low grade—in part because the hundred-odd requests were perceived to be served without a CDN—was starting to get me down ;) YSlow is a great plugin for analysing your site in Firebug but it's grading system can be a bit tough.
The YSlow FAQ will tell you how to configure the plugin to acknowledge the use of a CDN by setting a extensions.yslow.cdnHostnames preference. I won't repeat those details here but will expand on how the string value might be configured to tell YSlow a CDN is in use—whether you’re telling the truth or not. It’s surprisingly simple.
In our particular case, www.westernaustralia.com is a CNAME to an Akamai URL so telling YSlow to use akamai.com as a CDN doesn’t make sense and YSlow isn’t smart enough to figure things out on its own. Since www.westernaustralia.com is implicitly its own CDN, configuring the the extensions.yslow.cdnHostnames value as westernaustralia.com sorts everything out. I had to restart Firefox (3.5.x) and reload the page for things to take effect.
If you’re not using a CDN and want to turn off this particular component of your grade (or at least make it an “A”), simply add your own URL; regardless of whether you’re actually using a CDN, YSlow will think you are.
I can't get yslow to work correctly per suggestion above.
ReplyDeleteakamai cdn via vps.net for halfwaytoconcord.com, which is served from webserver.worldviewpr.com which serves a coupl of domains within the account. What am I doing wrong? Any clue is appreciated thanks.
Hi Bill,
ReplyDeleteThe crux of this trick is to configure the primary domain name--in your case halfwaytoconcord.com. I did this and, as you report, the Use a CDN rule still reports an F grade. Drilling into the findings, I see 8 requests are reported as not using a CDN--requests issued to Google, doubleclick, etc; without the preference being set, YSlow reports 39 static components that are not on a CDN.
If you're that keen try adding all (or most) of the domain names your page references.
M
All this does is configure YSLOW to not show the warning, correct? Setting a domain name there doesn't affect BING/YAHOO/GOOGLE search results at all or speed of the site correct? I don't understand why this CDN thing is even there.
ReplyDelete@Portland Web Marketing: Correct and correct. I reckon it's a weird default given many web sites won't be using a CDN in the first place but for those that do, it's an important part of the performance equation and needs to be considered by a tool like YSlow.
ReplyDeleteThanks for advice!
ReplyDeleteI've tried to use YSlow but i couldn't find right preferences. Is it good for UK? I am thinking about http://cdnsun.com/ but it's a little bit expensive. That's why i am trying to find free solution
ReplyDelete