Home
Knowledge Base
Credits
Site Map
 


The Conditional GET

 

HTTP has a mechanism that allows a cache to verify that its objects are up to date. This
mechanism is called the conditional GET. An HTTP request message is a so-called
conditional GET message if the request message uses the GET method and the request
message includes an In-Modified-Since: header line. The cache forwards the object to the
requesting browser but also caches the object locally. It also stores the last-modified date
along with the object. One week later, another browser requests the same object via the
cache, and the object is still in the cache. Since the object may have been modified at the
Web server in the past week, the cache performs an up-to-date check by issuing a
conditional GET. The Web server still sends a response message but does not include the
requested object in the response message. Including the requested object would only waste
bandwidth and increase user-perceived response time, particularly if the object is large. If
the response message has in the status line Not Modified, the cache can go ahead and
forward its cached copy of the object to the requesting browser.