Getting optimization tips with YSlow
When we're hitting performance issues, we need to know what to do. YSlow, from Yahoo!, is a speed diagnostic tool that quickly lists down suggestions based on various factors.
Getting ready
We'll require a Firefox browser with the Firebug plugin installed. YSlow is an add-on for Firebug that also needs to be installed to get optimization tips. When installed, it adds another tab inside Firebug, as shown in the following screenshot:
How to do it...
When executed on any page, YSlow gives a page-specific report with tips on optimization. It's also bundled with a few optimization tools that will help us quickly fix performance issues. Since it's a browser-based tool, it cannot make a suggestion for server-side code—it can only suggest server settings like gzip
and expire
headers.
When installing YSlow, it is a good practice to turn its autorun mode off. Otherwise, it will get executed for every page and that would slow down the browsing experience for other pages...