HTTP head头中’Age’的含义

HTTP head头中’Age’的含义

作者:admin |  时间:2014-03-03 |  浏览:622 |  0 条评论


See the HTTP 1.1 specification on what the Age header field is intended to be used for:

The Age response-header field conveys the sender's estimate of the amount of time since the response (or its revalidation) was generated at the origin server.

This information is used by intermediate proxies to convey an estimate of how old a stored response is:

HTTP/1.1 requires origin servers to send a Date header, if possible, with every response, giving the time at which the response was generated (see section 14.18). We use the term "date_value" to denote the value of the Date header, in a form appropriate for arithmetic operations.

HTTP/1.1 uses the Age response-header to convey the estimated age of the response message when obtained from a cache. The Age field value is the cache's estimate of the amount of time since the response was generated or revalidated by the origin server.

Furthermore, the Age header field is intended to be used by intermediate caches only:

The presence of an Age header field in a response implies that a response is not first-hand.

That means the presence of the header field Age: 0 means that the received response was sent by an intermediate cache and is only zero seconds old. So it was probably just fetched from the origin server before sending it to the client.






您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>