You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Diana Horvitz <Di...@exlibris.co.il> on 2005/05/08 10:26:34 UTC
[users@httpd] "Expires" and "Cache-Control" don't work properly
Hi,
I have a system in which all the pages are generated on the fly.
I want those pages not to be cached. I do want to cache images and css
files.
I have two servers, with two different configuration directives
Server 1)
Header set Pragma "no-cache"
Header set Expires "Fri, 01 Jan 2000 00:00:00 GMT"
Header set Cache-Control "no-cache, must-revalidate"
ExpiresActive on
ExpiresDefault "now"
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/jpg A2592000
ExpiresByType text/css A2592000
Server 2)
Header set Pragma "no-cache"
Header set Expires "Fri, 01 Jan 2000 00:00:00 GMT"
Header set Cache-Control "no-cache, must-revalidate"
ExpiresActive on
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/css A2592000
<Files ~ "\.(gif|jpe?g|png|css|sav)$">
Header unset Cache-Control
Header unset Expires
Header unset Pragma
</Files>
The problem I have (on both servers) is that the pages ARE cached, no matter
the definitions of Expires and Headers.
We have Apache 2.0.52 installed on both servers.
What am I doing wrong?
Thanks in advance,
Diana.
-------------------------------------------------------
Diana Horvitz - Yeudkin
Development Team - Ex Libris Jerusalem
Diana.Horvitz@exlibris.co.il
--------------------------------------------------------
This message has been scanned for viruses and
dangerous content by Ex Libris Ltd, and is
believed to be clean.
--------------------------------------------------------