Add an Expires Header to static components with mod_expires
According to Yahoo’s Best Practices for Speeding Up Your Web Site,
adding an expires header to static components can improve web site’s performance greatly.
Here is the simplest way to add expires header.
Open .htaccess file, and append the code.
<IfModule mod_expires.c>
<FilesMatch "\.(ico|gif|jpg|JPG|jpeg|png|swf|css|js|html?|xml|txt)$">
ExpiresActive On
ExpiresDefault "access plus 1 years"
</FilesMatch>
</IfModule>
More details about mod_expires, please refer:
http://httpd.apache.org/docs/2.0/mod/mod_expires.html
Thank you very much for this useful blog post.