Speed Tips: Remove Last-Modified Header
If you remove the
ETag header, you will totally eliminate
If-None-Match requests and their
304 Not Modified Responses, so a file will stay cached without checking for updates until the Expires header indicates new content is available!
Remove Last-Modified Header
Please don't turn off ETags and Last-Modified headers for your .html files, leave one of them ON. (I use Last-Modified for .html).
This goes in your root .htaccess file but if you have access to
httpd.conf that is better.
This code uses the FilesMatch directive and the Header directive to remove all
Last-Modified Headers from being sent.
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css)$"> Header unset Last-Modified </FilesMatch>
How it Works
Cache-Control header and
Expires header, you can specify that certain files be cached for a certain period of time, and you magically (this is a really unique trick I promise) eliminate any validation requests!!
« Speed Tips: Turn Off ETagsSpeed Up Google Analytics with urchin.js »