previous | start

Implementing Caching

It's obvious that the proxy server can check its local cache to see if a requested object has recently been fetched. It is slightly more subtle to discover if it's actually the same object. HTTP/1.1 adds some new response headers to ensure that caching works correctly:
Expires: Wed, 27 Mar 2002 02:22:52 GMT
Pragma: no-cache
An object can be marked as having a limited lifetime, and once the specified date/time has passed must be re-fetched from the originating server. Also, an object can be flagged as "un-cachable". These were both present in HTTP/1.0.
 
Etag: "8802-2c72-3ab178fc"
This is the "Entity Tag", and is used to discover, with somewhat greater certainty, if the object (or entity) in the local cache is exactly the same object (eg, isn't different in any way) as the object stored on the remote server. The client can use an If-None-Match: "8802-2c72-3ab178fc"
header with a GET request to specify the version of the object which it already has. This is a significant improvement over the HTTP/1.0 "Conditional-GET". Note that HTTP/1.1 has a large number of other operations which can be used with Entity Tags.

 
You can discover lots more about HTTP at: http://www.w3.org/pub/WWW/Protocols/Specs.html
 
Lecture 7: Internet Applications #3.3: HTTP/1.1 Copyright © 2002 P.Scott, La Trobe University Bendigo.

The tutorial for this lecture is Tutorial #7.
La Trobe Uni Logo [Previous Lecture] [Lecture Index] [Next Lecture]
Copyright © 2002 by Philip Scott, La Trobe University.
Valid HTML 3.2!

previous | start