Tips to speed up website and get high ranking in ySlow

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

<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"

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.

<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

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

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: