Cache-Control HTTP Headers
HTTP 1.1에서는 헤더에 대한 새로운 컨트롤을 소개하고 있다. Cache-Control 응답 헤더가 그것인데, 이것은 웹 퍼블리셔에게 그들의 컨텐트를 더욱 많은 컨트롤을 제공하고, Expires의 제한에 대해서 말하고 있다.
유용한 Cache-Control응답 헤더 :
max-age=
[seconds] — specifies the maximum amount of time that an representation will be considered fresh. Similar toExpires
, this directive is relative to the time of the request, rather than absolute. [seconds] is the number of seconds from the time of the request you wish the representation to be fresh for.s-maxage=
[seconds] — similar tomax-age
, except that it only applies to shared (e.g., proxy) caches.public
— marks authenticated responses as cacheable; normally, if HTTP authentication is required, responses are automatically uncacheable (for shared caches).no-cache
— forces caches to submit the request to the origin server for validation before releasing a cached copy, every time. This is useful to assure that authentication is respected (in combination with public), or to maintain rigid freshness, without sacrificing all of the benefits of caching.no-store
— instructs caches not to keep a copy of the representation under any conditions.must-revalidate
— tells caches that they must obey any freshness information you give them about a representation. HTTP allows caches to serve stale representations under special conditions; by specifying this header, you’re telling the cache that you want it to strictly follow your rules.proxy-revalidate
— similar tomust-revalidate
, except that it only applies to proxy caches.
For example:
Cache-Control: max-age=3600, must-revalidate
If you plan to use the Cache-Control
headers, you should have a look at the excellent documentation in HTTP 1.1; see References and Further Information.
'WEB_Programming' 카테고리의 다른 글
Eclipse 3.5 JBoss 5.1.0 and JAX-WS 2.1 setup. (0) | 2009.10.28 |
---|---|
JDBC를 이용한 사용자 정의 SQL Object를 저장하고, 탐색하는 방법 (0) | 2009.10.23 |
ieHTTPHeaders 를 이용한 HTTP 전송 헤더 확인하기 (0) | 2009.09.26 |
Excel file Download (0) | 2009.01.25 |
eclipse 실행시 메모리 에러 나는경우 eclipse.ini 수정하기 (0) | 2008.12.15 |