Adding expire headers is a good way to keep client requests to a minimum. Without them every time the client’s browser requests a file the server has to serve it. Adding expire headers, in this case to the .htaccess file, keeps a cached version of the requested file on the client’s computer in case it is requested again. For example, you have an image gallery. The client clicks on a picture, the picture is served to them, fine. Now when the client clicks the link at the top of your page to return to the main gallery page, ALL those thumbnails of the large images are requested from the server. With this code the client merely retrieves the same images he originally saw again, without the extra server requests. Nice isn’t it?
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
Header unset Last-Modified
Header set Expires "Fri, 10 Jun 2050 00:00:00 GMT"
Header set Cache-Control "public, no-transform"
</FilesMatch>


July 6th, 2009 at 5:41 PM
You know so many interesting infomation. You might be very wise. I like such people. Don’t top writing.