看到一篇关于Cache-Control的文章,尽管是2002年的文章,还是不错的,算是记录以下吧,赫赫! 详细的阐述了Cache-Control的各个属性及用法,以及HTTP/1.0中仅支持的"Pragma: no-cache " 等价于HTTP/1.1"Cache-Control : private",更多的大家自己看吧。
Any valid HTTP headers can be put in these files. This provides another way to apply the Expires header, and it's a way to add the Cache-Control headers. The relevant Cache-Control headers are:
Cache-Control : max-age = [delta-seconds]
Modifies the expiration mechanism, overriding the Expires header. Max-age implies Cache-Control : public.Cache-Control : public
Indicates that the object may be stored in a cache. This is the default.Cache-Control : private
Cache-Control : private = [field-name]
Indicates that the object (or specified field) must not be stored in a shared cache and is intended for a single user. It may be stored in a private cache.Cache-Control : no-cache
Cache-Control : no-cache = [field-name]
Indicates that the object (or specified field) may be cached, but may not be served to a client unless revalidated with the origin server.Cache-Control : no-store
Indicates that the item must not be stored in nonvolatile storage, and should be removed as soon as possible from volatile storage.Cache-Control : no-transform
Proxies may convert data from one storage system to another. This directive indicates that (most of) the response must not be transformed. (The RFC allows for transformation of some fields, even with this header present.)Cache-Control : must-revalidate
Cache-Control : proxy-revalidate
Forces the proxy to revalidate the page even if the client will accept a stale response. Read the RFC before using these headers, there are restrictions on their use.
Caveats and gotchas
-
HTTP/1.0 has minimal cache control and only understands the Pragma: no-cache header. Caches using HTTP/1.0 will ignore the Expires and Cache-Control headers.
-
None of the Cache-Control directives ensure privacy or security of data. The directives "private" and "no-store" assist in privacy and security, but they are not intended to substitute for authentication and encryption.
-
This article is not a substitute for the RFC. If your are implementing the Cache-Control headers, do read the RFC for a detailed description of what each header means and what the limits are.
分享到:
相关推荐
例如,“Cache-Control: max-age=3600”表示资源的有效期为3600秒,期间浏览器可以使用缓存副本而无需再次请求服务器。 “IE文档缓存分析”可能涉及的内容包括浏览器如何存储缓存数据,通常是在用户的临时Internet...
<meta http-equiv="Cache-Control" content="no-cache"> ``` #### 三、Cache-Control属性详解 `Cache-Control`属性是HTTP头部字段之一,用于控制客户端和中间代理如何存储、检索以及重新验证响应。以下是一些...
Cache-Control: no-cache Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Origin: http://cms.cn Referer: http://cms.cn/admin/ Connection: close Cookie: met_auth=30ac30fgvWFY3ebf9Wgl9S6...
git-secrets --add-provider-curl -H'Cache-Control:no-cache'https: 预先提交安装-f 建造Voltron 去建造 运行Voltron ./伏特朗 在当前目录中运行测试文件 去测试 递归运行所有测试文件 去测试。/ ... 发布...
<meta http-equiv="Cache-Control" content="no-cache" /> <meta http-equiv="Expires" content="0" /> ``` 1. `<meta http-equiv="Pragma" content="no-cache">`: 这一行设置HTTP头的Pragma字段,指示浏览器不要...
[2964655] VMX not enabled in MSR IA32_FEATURE_CONTROL [3005865] IDT show bug [3001637] CMOS MAP register meaning error [2994370] Cannot build with 3DNow support - these S.F. feature requests were...
- Cache-Control: no-cache, max-age=0, must-revalidate, no-store - Content-Language: en-US - Vary: Accept-Encoding - Connection: close - Content-Type: text/html;charset=UTF-8 - Content-Length: ...
* Control Panel:控制面板,用于管理Caché数据库 * Configuration Manager:配置管理器,用于设置Caché数据库的参数 * Documentation:在线帮助文档 * Remote System Access:远程系统控制 * Preferred Server:...
- About SSL - Support - Release notes - Midware - Known problems - Special thanks Legal issues: ------------- Copyright (C) 1997-2016 by Fran鏾is PIETTE Rue de Grady 24, 4053 Embourg, Belgium ...
Indispensable PC Hardware Book 4/e will be 'indispensable' to anyone who wants to know more about the inner workings of a personal computer: from programmers who want access to hardware components; ...
Maximal size of cache for debug messages is 1MB. Some messages can be lost if frequency/size of debug messages is too big. 3.3) IRPTrace does not allow to set hook on IRPDRV driver 4) Known bugs ...
user_ini.cache_ttl = 300 ;;;;;;;;;;;;;;;;;;;; ; Language Options ; ;;;;;;;;;;;;;;;;;;;; ; Enable the PHP scripting language engine under Apache. ; http://php.net/engine engine = On ; This directive...
control method attempts to create 2 objects of the same name. This once again returns AE_ALREADY_EXISTS. When this exception occurs, it invokes the mechanism that will dynamically serialize the ...
When true then in ftmPanning mode the whole document image cache created in currect scale. - FIX: Support for the Import/Export modules that can't work with Streams. Added TFlexFileFormat....
An Easy Way to Remember the 8086 Memory Addressing Modes 4.6.2.8 - Some Final Comments About 8086 Addressing Modes 4.6.3 - 80386 Register Addressing Modes 4.6.4 - 80386 Memory Addressing ...
+ [enterprise] added property "ReportsFile" - path to file with reports to groups associations and cache delays + [enterprise] added property "ReportsListRenewTimeout" in server configuration + ...
The XtraTreeList Suite is the first comprehensive TreeList control for Visual ...Total Control, Flexibility and PowerThe Only No Limits TreeList Available for .NETLearn more about the XtraTreeList....
Each control must have a unique TDDUOSDNS control.About the Demo :The demo project shows how to use each control. The TDDUOSDNS control is shown both in combination with other controls, and used ...
amazing control to repair Windows as well. If a particular technology gives you trouble you can completely remove it, and then reinstall it as cleanly as the day Windows was first installed on your ...