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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

in the past. This means that the response is always stale, and so thecache SHOULD validate it be<strong>for</strong>e using it <strong>for</strong> subsequent requests. Seesection 14.9.4 <strong>for</strong> a more restrictive way to <strong>for</strong>ce revalidation.If an origin server wishes to <strong>for</strong>ce any HTTP/1.1 cache, no matter howit is configured, to validate every request, it SHOULD use the "mustrevalidate"cache-control directive (see section 14.9).Servers specify explicit expiration times using either the Expiresheader, or the max-age directive of the Cache-Control header.An expiration time cannot be used to <strong>for</strong>ce a user agent to refreshits display or reload a resource; its semantics apply only to cachingmechanisms, and such mechanisms need only check a resource'sexpiration status when a new request <strong>for</strong> that resource is initiated.See section 13.13 <strong>for</strong> an explanation of the difference between cachesand history mechanisms.13.2.2 Heuristic ExpirationSince origin servers do not always provide explicit expiration times,HTTP caches typically assign heuristic expiration times, employingalgorithms that use other header values (such as the Last-Modifiedtime) to estimate a plausible expiration time. The HTTP/1.1specification does not provide specific algorithms, but does imposeworst-case constraints on their results. Since heuristic expirationtimes might compromise semantic transparency, they ought to usedcautiously, and we encourage origin servers to provide explicitexpiration times as much as possible.13.2.3 Age CalculationsIn order to know if a cached entry is fresh, a cache needs to know ifits age exceeds its freshness lifetime. We discuss how to calculatethe latter in section 13.2.4; this section describes how to calculatethe age of a response or cache entry.In this discussion, we use the term "now" to mean "the current valueof the clock at the host per<strong>for</strong>ming the calculation." Hosts that useHTTP, but especially hosts running origin servers and caches, SHOULDuse NTP [28] or some similar protocol to synchronize their clocks toa globally accurate time standard.<strong>Fielding</strong>, et al. Standards Track [Page 80]RFC <strong>2616</strong> HTTP/1.1 June 1999HTTP/1.1 requires origin servers to send a Date header, if possible,

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

Saved successfully!

Ooh no, something went wrong!