YSlow, firefox add-on to determine Why your website is slow

 April 27, 2008 Filed Under Blogging Tips, Software Tips, Tech Tips

YSlow tells you why each page on your website is slow. If a page can be improved, YSlow lists the specific changes to be made. Yslow is a Firefox add-on integrated with Firebug and is available for free download. Since YSlow is integrated with Firebug, you need to first install Firebug before installing YSlow.If you do not have firefox,

YSlow workflow:

YSlow crawls the DOM to find all the web components on the webpage including images, scripts, stylesheets, etc. Then YSlow loops through Firebug’s Net Panel components and adds those to the list of components already found via the DOM crawl. 
 

YSlow reads the characteristics of each web component like size, Expires header, whether it was gzipped, etc. in the second pass. YSlow primarily looks for these information from Firebug’s Net Panel, if it is available. If the web component’s characteristics are not available from Firebug’s Net Panel (for example, in cases where the component is read from cache or it has a 304 response) YSlow makes an ajax request (XMLHttpRequest) to fetch the component and read its headers and other characteristics necessary to determine the performance of the web page. 
 

YSlow finally calculates the overall performance grade for the web page by assigning grade for each of those characteristics, based on Yahoos 34 rules or best practices for high performance web sites, and finding a weighted average of the individual grades for each rule.

How does YSlow calculate grade for each of the performance rules?

YSlow uses the components’ HTTP response headers to compute a score for each of the 34 performance rules or best practices for speeding up a website. For example, YSlow uses the Expires header to evaluate Rule 3, and the ETag header for Rule 13. If necessary, YSlow gets this header information by re-requesting the components using XMLHttpRequest, but this takes time and CPU.

YSlow handles DHTML, Ajax and Web 2.0:

YSlow analyzes all the components in the page, including components downloaded using these Web 2.0 techniques. If these dynamically loaded components are missing an Expires header or aren’t gzipped they will be reported by YSlow, as expected. 
 

If your Web 2.0 page dynamically downloads components after the onload handler or uses Ajax, you can measure these components by disabling the YSlow Autorun option, and instead launching YSlow manually after all these requests are done.

YSlow free download:

Copyright ©2007 Techblissonline.com, All rights reserved. | Privacy Policy