Here is an example HTTP request and the associated response received from retrieving this file.
GET /gaming/img/apple-touch-icon.png HTTP/1.1
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:18.104.22.168) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10
If-Modified-Since: Wed, 06 Oct 2010 19:18:55 GMT
...and the response...
HTTP/1.1 200 OK
Last-Modified: Wed, 06 Oct 2010 19:14:02 GMT
Date: Thu, 07 Oct 2010 21:41:32 GMT
Here is the relevant information:
- In the request headers, notice the
If-Modified-Since header. This tells the server to return the full content only if it has been modified since the given date.
- In the response headers, notice the
Cache-Control: max-age=604800 line. This tells the client that if the file in the browser's cache is older than this time period, then it should issue a new request.
- Lastly, notice the
Last-Modified header in the response. This indicates the date and time the file was last modified. This information is typically retrieved from the filesystem.