If-Modified-Since
and If-None-Match
requests and their 304 Not Modified
Responses.
Entity tags (ETags) are a mechanism to check for a newer version of a cached file.
Easy Apache Speed Tips Articles
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 FileETag and the Header directive to remove all ETags from being sent.
Header unset ETag FileETag None
Notice that the ETag performs the same service that Last-Modified header performs.
Response for /i/yahoo.gif
HTTP/1.1 200 OK Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT ETag: "10c24bc-4ab-457e1c1f" Content-Length: 12195
Later, if the browser has to validate a component, it uses the If-None-Match header to pass the ETag back to the origin server. If the ETags match, a 304 status code is returned reducing the response by 12195 bytes for this example.
GET /i/yahoo.gif HTTP/1.1 Host: us.yimg.com If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT If-None-Match: "10c24bc-4ab-457e1c1f" HTTP/1.1 304 Not Modified