Analyzing and Fine-Tuning Website Performance with Yslow

Websites are built with multiple purposes in mind – rendering rich visual experience, ease of navigation, e-commerce functionalities, ease of ongoing maintenance to keep pages up to date, and various other factors. Fast page download times or end-user response times are surely a critical requirement for the user but perhaps only on the wish list of a casual website designer/developer – the unknown and varying network characteristics of the Internet sitting between the user and the websites is a big challenge. The fact that websites are increasingly accessed by browsers on mobile devices such as smart phones and tablets with limited processing power and constrained bandwidth makes fulfilling fast-response time requirement harder and harder.

WAN optimization techniques which are hugely successful in corporate environments cannot be directly imported because the classical data center-to-remote site topology does not apply to a single user visiting multiple websites.

Big Internet portals such as Google and Yahoo follow best practices and build performance requirements right at the planning stages. They use sophisticated tools that can help in making web apps faster and faster for their end-users. One such tool that is really handy is YSlow from Yahoo. YSlow is a free tool that can be installed as an add-on to a Firefox browser (enabled with Firebug). It is intended for use by the website developers to help manage response time requirements. When you visit any website with Firefox browser, YSlow measures the page download time and grades the website page in 23 or so categories along with some good recommendations.

Some examples of recommendations include: making fewer ‘http’ requests, using Content Delivery Networks (CDNs), positioning style sheets and Java scripts, reducing DNS look-ups, compressing and minifying techniques. Yslow also depicts the component weights in Kbytes for both empty cache (first time visits) and primed cache (subsequent visits).

Following the recommendations provided by YSlow in designing websites can help cut down the response time by 25% or more. YSlow was developed by Steve Souders when he was the performance chief at Yahoo. He is now with Google (and incidentally Google has a similar tool called Page Speed that works with Chrome browser). Steve has also published two books on best practices in high performance website design which are great handbooks for any serious website designer/developer.

One caution to note is that Yslow is not network “aware”. Hence the website developer/tester has to create the realistic network environment (either Internet or a company WAN) by emulation or simulation techniques to perform testing and fine-tune each webpage. Yslow is currently available for only Firefox browsers and not for the more popular Internet Explorer (IE).

With the proliferation of smart phones and constant user complaints about slow access to their favorite websites, companies are scrambling to “mobilize” their websites. I see YSlow as a handy tool complementing sophisticated tools such as those from OPNET and Shunra which are more comprehensive and incorporate the WAN aspects (bandwidth, latency, packet loss, and jitter) which hold the final key to web App Performance Management (APM).