YSlow and web optimization
Yahoo's YSlow extension for Firefox (with Firebug plugin) analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. Typical suggestions include:
This page has 12 external Javascript scripts. Try combining them into one.
This page has 13 external stylesheets. Try combining them into one.
This page has 19 external background images. Try combining them with CSS sprites
Some of these are fairly easy to do if you are a web developer and have full access to the source code behind your site. In some cases however you may be using a CMS (Content Management System) such as Drupal, Joomla, DotNetNuke etc. or blogging or wiki such as WordPress or MediaWiki and in these cases you don't always have control over the HTML, CSS and JavaScript that is used.
If you want to look at commercial solutions to addressing the YSlow recommendations then you might look at a Content Delivery Network (CDN) as it suggests. These allows you to geographically distribute and cache static content like images to servers around the world so that they get served locally to the user. There are several CDN solutions out there but most are quite costly and aimed at larger enterprises.
For small to medium size businesses a better solution might be to look at a software web accelerator. Aptimize is the one which we have just started to work with seems to tackle most of these YSlow recommendations without having to make any code changes. They do this by running as a web server module for IIS or Apache which allows them to dymanically optimize the content on the fly. JavaScript is combined into a single file and minified, removing whitespace and redundant characters. The same is done for CSS. Images are combined into a mosaic and CSS sprites are used to display the required portion of the image. For all static content far-future-expiry dates are set so the content is cached by the browser until it changes. Other optimization techniques are also use including GZip compression. The result is that your page load times for your website maybe halved.
- Make fewer HTTP requests
- Use a Content Delivery Network (CDN)
- Add Expires headers
- Compress components with gzip
- Put CSS at top
- Put JavaScript at bottom
- Avoid CSS expressions
- Make JavaScript and CSS external
- Minify JavaScript and CSS
- Remove duplicate JavaScript and CSS
This page has 12 external Javascript scripts. Try combining them into one.
This page has 13 external stylesheets. Try combining them into one.
This page has 19 external background images. Try combining them with CSS sprites
Some of these are fairly easy to do if you are a web developer and have full access to the source code behind your site. In some cases however you may be using a CMS (Content Management System) such as Drupal, Joomla, DotNetNuke etc. or blogging or wiki such as WordPress or MediaWiki and in these cases you don't always have control over the HTML, CSS and JavaScript that is used.
If you want to look at commercial solutions to addressing the YSlow recommendations then you might look at a Content Delivery Network (CDN) as it suggests. These allows you to geographically distribute and cache static content like images to servers around the world so that they get served locally to the user. There are several CDN solutions out there but most are quite costly and aimed at larger enterprises.
For small to medium size businesses a better solution might be to look at a software web accelerator. Aptimize is the one which we have just started to work with seems to tackle most of these YSlow recommendations without having to make any code changes. They do this by running as a web server module for IIS or Apache which allows them to dymanically optimize the content on the fly. JavaScript is combined into a single file and minified, removing whitespace and redundant characters. The same is done for CSS. Images are combined into a mosaic and CSS sprites are used to display the required portion of the image. For all static content far-future-expiry dates are set so the content is cached by the browser until it changes. Other optimization techniques are also use including GZip compression. The result is that your page load times for your website maybe halved.
| < Prev | Next > |
|---|




