11.07.2015 Views

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

Network Working Group R. Fielding Request for Comments: 2616 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

esponse without validating it. Clients do this using severaldirectives of the Cache-Control header.A client's request MAY specify the maximum age it is willing toaccept of an unvalidated response; specifying a value of zero <strong>for</strong>cesthe cache(s) to revalidate all responses. A client MAY also specifythe minimum time remaining be<strong>for</strong>e a response expires. Both of theseoptions increase constraints on the behavior of caches, and so cannotfurther relax the cache's approximation of semantic transparency.A client MAY also specify that it will accept stale responses, up tosome maximum amount of staleness. This loosens the constraints on thecaches, and so might violate the origin server's specifiedconstraints on semantic transparency, but might be necessary tosupport disconnected operation, or high availability in the face ofpoor connectivity.13.2 Expiration Model13.2.1 Server-Specified ExpirationHTTP caching works best when caches can entirely avoid makingrequests to the origin server. The primary mechanism <strong>for</strong> avoidingrequests is <strong>for</strong> an origin server to provide an explicit expirationtime in the future, indicating that a response MAY be used to satisfysubsequent requests. In other words, a cache can return a freshresponse without first contacting the server.Our expectation is that servers will assign future explicitexpiration times to responses in the belief that the entity is notlikely to change, in a semantically significant way, be<strong>for</strong>e theexpiration time is reached. This normally preserves semantictransparency, as long as the server's expiration times are carefullychosen.<strong>Fielding</strong>, et al. Standards Track [Page 79]RFC <strong>2616</strong> HTTP/1.1 June 1999The expiration mechanism applies only to responses taken from a cacheand not to first-hand responses <strong>for</strong>warded immediately to therequesting client.If an origin server wishes to <strong>for</strong>ce a semantically transparent cacheto validate every request, it MAY assign an explicit expiration time

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!