ETAG Cache Expires

[b]http://msdn.microsoft.com/en-us/library/bb250442(VS.85).aspx[/b]

Table 1. Client Cache Headers
[table]
|Pragma: no-cache|The client is unwilling to accept any cached responses from caches along the route and the origin server must be contacted for a fresh copy of the resource.
|If-Modified-Since|datetime The server should return the requested resource only if the resource has been modified since the date-time provided by the client.
|If-None-Match: etagvalue|The server should return the requested resource if the ETAG of the resource is different than the value provided by the client. An ETAG is a unique identifier representing a particular version of a file.
[/table]

[b]Any Cache-Control directives supersede the Expires header.[/b]

Table 2. Common Cache-Control Headers
[table]
|public|The response may be stored in any cache, including caches shared among many users.
|private|The response may only be stored in a private cache used by a single user.
|no-cache|The response should not be reused to satisfy future requests.
|no-store|The response should not be reused to satisfy future requests, and should not be written to disk. This is primarily used as a security measure for sensitive responses.
|max-age=#seconds|The response may be reused to satisfy future requests within a certain number of seconds.
|must-revalidate|The response may be reused to satisfy future requests, but the origin server should first be contacted to verify that the response is still fresh.
[/table]

[list]
[*]1)For legacy reasons, servers may send a Pragma: no-cache header. This is treated as Cache-Control: no-cache.
[*]2)The Vary header signals to a cache that a response is valid for reuse only under certain circumstances. For example, use Vary: User-Agent to direct that the current response may only be reused for future requests sending the same User-Agent header. The directive Vary: * is equivalent to Cache-Control: no-cache.
[*]3)关于Vary的定义:http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.44
[/list]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值