`
masterkey
  • 浏览: 330345 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

about Cache-Control

阅读更多

      看到一篇关于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.

分享到:
评论

相关推荐

    poc-va-cli

    git-secrets --add-provider-curl -H'Cache-Control:no-cache'https: 预先提交安装-f 建造Voltron 去建造 运行Voltron ./伏特朗 在当前目录中运行测试文件 去测试 递归运行所有测试文件 去测试。/ ... 发布...

    Bochs - The cross platform IA-32 (x86) emulator

    [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...

    The Indispensable PC Hardware Book - rar - part1. (1/7)

    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; ...

    ICS delphixe10源码版

    - 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 ...

    IRPTrace2.00.002.zip

    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 ...

    Inside ASP.NET

    14. Cache Control in ASP.NET ASP.NET Cache Management Page Output Caching Fragment Caching (Partial Page Caching) Request Caching Summary 15. Creating User and Custom Controls for ASP.NET...

    php.ini-development

    user_ini.cache_ttl = 300 ;;;;;;;;;;;;;;;;;;;; ; Language Options ; ;;;;;;;;;;;;;;;;;;;; ; Enable the PHP scripting language engine under Apache. ; http://php.net/engine engine = On ; This directive...

    FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持D4-XE5

    + [enterprise] added property "ReportsFile" - path to file with reports to groups associations and cache delays + [enterprise] added property "ReportsListRenewTimeout" in server configuration + ...

    acpi控制笔记本风扇转速

    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 ...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    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....

    The Art of Assembly Language Programming

    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 ...

    DevExpress.XtraTreeList.Net.v1.7.0.Incl.Source

    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....

    TraceRoute

    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 ...

    xplite_trial

    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 ...

    LESSY-BLOG(LBS2.0.283汉化修改版)

    Fixed a bug with ubbFlags- source/src_trackback.asp: Added list trackback by article ID- source/src_comment.asp: Added settting control- source/src_admin.asp: Added settings- source/src_article.asp: ...

    EurekaLog_7.5.0.0_Enterprise

    9)....Added: EMemLeaks._ReserveOutOfMemory to control reserve size of out of memory errors (default is 50 Mb) 10)..Added: "MinLeaksLimitObjs" option (EMemLeaks unit) 11)..Added: Fatal memory problem ...

    微软内部资料-SQL性能优化2

    The Windows 2000 cache manager provides data caching for both local and network file system drivers. By caching virtual blocks, the cache manager can reduce disk I/O and provide intelligent read ahead...

    VB.NET Developer's Guide(4574).pdf

    Using the Windows Forms ActiveX Control Importer 338 Summary 340 Solutions Fast Track 340 Frequently Asked Questions 344 Chapter 8 Windows Forms Components and Controls 347 Introduction 348 ...

    Debugging with GDB --2002年5.11

    r GDB/MI Program control r Miscellaneous GDB commands in GDB/MI r GDB/MI Stack Manipulation Commands r GDB/MI Symbol Query Commands r GDB/MI Target Manipulation Commands r GDB/MI Thread Commands r GDB...

Global site tag (gtag.js) - Google Analytics