Resolving YSlow’s “Add Expires headers” Low Grade

Speed up the loading of your site by caching web site files like images, CSS and javascript files. First time visitors of your site will gonna be making several HTTP requests. The more HTTP requests, the slower your site will load.

I found a good website speed tip that would help make those frequently requested files cacheable.

Using .htaccess you can add the following code add expire headers to your files:

[php]<FilesMatch “\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
Header set Expires “Thu, 15 Apr 2011 20:00:00 GMT”

NOTE: Backup your .htaccess file first before modifying it.

Now your site will load up a little bit faster.


<FilesMatch “\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
Recent Posts