Tips to speed up website and get high ranking in ySlow

  • Avinash
  • 3
  • Aug 11, 2010
  • Tips & Tricks

In some previous posts I have described some website optimization rules which Yahoo consider. Yahoo have developed the best website monitoring tool “ySlow“.

You can add this add on in your mozila firefox browser. Firebug (another great addon) is required in order to run the ySlow.

Here I will describe some Tips which will give you high ranking in ySlow as well as it will increase your site speed also.

  • Add Expire Headers.
  • Gzip Compression.
  • Configure ETags.

Here I will provide some code which you need to place in your .htaccess file. So let’s start.

Add Expire Headers

I have explained this rule in details at Here.

Here is the code to place in .htaccess file

ExpiresActive on ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" ExpiresByType application/x-javascript "access plus 1 month"
<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType application/javascript "access plus 1 month"
  ExpiresByType application/x-javascript "access plus 1 month"
</IfModule>

This will cache your static content like javascript files, images for next 1 month. So this will make your site load faster.

Gzip Components

Here is the code to place in .htaccess file.

AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript application/x-httpd-php application/rss+xml application/atom_xml
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/javascript application/x-javascript application/x-httpd-php application/rss+xml application/atom_xml
</IfModule>

This Code will add compression to the various types of components, So the end user will get compressed data and which makes  the faster loading of the website.
Configure ETags

FileETag none
  FileETag none

Above line should be places in your .htaccess file to remove the process of matching of the ETags.

Source : Yahoo Tips

Related Posts

Written by Avinash

Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.

View all posts by:

  • Mathilda

    Hey, thanks for the great article. Honestly, about five months ago I started using the internet and there is so much nonsense out there. I appreciate that you put excellent content out that is clear and well-written. Good luck and thanks for the great tips.

  • http://etheheth.com Scottie Saballos

    Good day after months of searching is senuke the best software? Do you agree?

  • Akhilesh

    Hi Avinash,

    Could you please provide me additional information regarding how to add far future expiration header to static component.
    Thanks for such a wonderful post.