YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.
It tell us why the page is slow based on Yahoo!’s rules for high performance web sites
Top Features are :-
- It Grades web page based on one of three predefined rule set;
- It gives suggestions for improving the performance;
- It Summarizes the all components of the web page;
- It gives statistics about the web page;
The tool is available for all major browsers like
Firefox
Chrome
Mobile/Bookmarklet
Opera
Safari
YSlow’s web page analysis is based on the 23 Rules there are as follows:-
Minimize HTTP Requests
Use a Content Delivery Network
Avoid empty src or href
Add an Expires or a Cache-Control Header
Gzip Components
Put StyleSheets at the Top
Put Scripts at the Bottom
Avoid CSS Expressions
Make JavaScript and CSS External
Reduce DNS Lookups
Minify JavaScript and CSS
Avoid Redirects
Remove Duplicate Scripts
Configure ETags
Make AJAX Cacheable
Use GET for AJAX Requests
Reduce the Number of DOM Elements
No 404s
Reduce Cookie Size
Use Cookie-Free Domains for Components
Avoid Filters
Do Not Scale Images in HTML
Make favicon.ico Small and Cacheable
How it works
YSlow works in three phases to generate its results.
YSlow crawls the DOM to find all the components (images, scripts, stylesheets, etc.) in the page.
After crawling the DOM, YSlow loops through Firebug’s Net Panel components and adds those to the list of components already found in the DOM
YSlow gets information about each component: size, whether it was gzipped, Expires header, etc. YSlow gets this information from Firebug’s Net Panel if it’s available.
If the component’s information is not available from Net Panel (for example, the component was read from cache or it had a 304 response) YSlow makes an XMLHttpRequest to fetch the component and track its headers and other necessary information.
YSlow takes all this data about the page and generates a grade for each rule, which produces the overall grade.