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
[cc lang=”php”]
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”
[/cc]
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.
[cc lang=”php”]
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
[/cc]
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
[cc lang=”php”]
FileETag none
[/cc]
Above line should be places in your .htaccess file to remove the process of matching of the ETags.
Source : Yahoo Tips
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.
Good day after months of searching is senuke the best software? Do you agree?
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.