Note that it's always better to set the headers both in the HTTP-EQUIV META tags as well as to set it via the headers as some browsers have problems parsing the HTTP-EQUIV META tags.
There are 3 HTTP headers that control browser caching behaviour. These are:
- expires
- pragma
- cache-control
The "pragma" directive indicates that the page should not be cached. The common use is to set the directive to "pragma: no-cache".
The "cache-control" directive is a HTTP 1.1 specification. It instructs the browser how the page should be cached. Commonly set values for this directives are:
- no-cache - tells the browser not to use a cached copy of the page
- no-store - tells the browser never to cache the page
expires: -1
cache-control: no-store
pragma: no-cache
No comments:
Post a Comment