[Next] [Up] [Previous]
Next: HTML Meta Tags vs. Up: HTTP/1.1 - The Next Previous: Persistent Connections

Caching

The HTTP/1.1 protocol includes a number of elements intended to make caching work as well as possible. Caching would be useless if it did not significantly improve performance. The goal of caching in HTTP/1.1 is to eliminate the need to send requests in many cases, and to eliminate the need to send full responses in many other cases. That is, there are two main reasons that web caching is used: Before proceeding to the description of how we can control caches in HTTP/1.1, at this point we 'll summarize shortly how web caches work. All caches have a set of rules that they determine when to serve an object from the cache, if it's available. Some of these rules are set in the protocols (HTTP 1.0 and 1.1), and some are set by the administrator of the cache (either the user of the browser cache, or the proxy administrator). Generally speaking, these are the most common rules that are followed for a particular request (don't worry if you don't understand the details, it will be explained below):
  1. If the object's headers tell the cache not to keep the object, it won't. Also, if no validator is present, most caches will mark the object as uncacheable.
  2. If the object is authenticated or secure, it won't be cached.
  3. A cached object is considered fresh (that is, able to be sent to a client without checking the origin server) if: Fresh documents are served directly from the cache, without checking with the origin server.
  4. If an object is stale, the origin server will be asked to validate the object, or tell the cache whether the copy that it has is still good.
Together, freshness and validation are the most important ways that a cache works with content. A fresh object will be available instantly from the cache, while a validated object will avoid sending the entire object over again if it hasn't changed. At this point, we will analyze the different ways which someone can control caches with, in general. We 'll begin our discussion with methods used prior HTTP/1.1, ending with the description of the methods that HTTP/1.1 provides.

Subsections
[Next] [Up] [Previous]
Next: HTML Meta Tags vs. Up: HTTP/1.1 - The Next Previous: Persistent Connections
Copyright © 2003, John Yannakopoulos <giannak@csd.uoc.gr>