HTTP head头中’Age’的含义

HTTP head头中’Age’的含义

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

Image

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.

从上面可以看出,Age表示中间环节(CDN或缓存服务器)从服务器拿到数据之后的时间。如果是客户端看到是0秒,代表是从服务器拿到的最新的数据。

本文标签:

相关推荐

初探 Times33算法
Posted on 02月22日
Json语法规定
Posted on 05月17日
libev源码学习
Posted on 08月17日
良好的源代码控制管理十戒
Posted on 02月17日

发表评论

电子邮件地址不会被公开。

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