You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Lisa Gerlich <li...@nisd.net> on 2002/03/27 17:12:28 UTC

mod_expires/mod_headers do not appear to work

Hello,

I am running Apache version 1.3.12 on a BSDI unix box.  I am attempting
to not have web browsers/proxy servers cache any page from the local
website for very long as we are having an internal problem with some
caching systems.

I have the following lines uncommented in my httpd.conf:

LoadModule expires_module    
/usr/contrib/libexec/apache/mod_expires.so
AddModule mod_expires.c

LoadModule headers_module    
/usr/contrib/libexec/apache/mod_headers.so
AddModule mod_headers.c   

I also added the following directives to httpd.conf:

ExpiresActive on
ExpiresDefault A60

Header Add Expires 0
Header Add Progma no-cache
Header Add Cache-Control no-cache  

(The Header references were added after trying to use the expires
module - as per a suggestion from the archives)

After modifying httpd.conf, I restarted the server with "apachectl
restart".  I loaded a page from a server into my browser and viewed the
source.  I was expecting to see header entries suggesting rules for the
browser to use when caching,  but I don't see anything like that between
the <head> </head> tags.  Perhaps I don't know what I am looking for.  I
cannot find anything in my html/xhtml book (O'Reilly - 4th edition) 
that refers to any code that will help to control caching behavior.  

Perhaps, I am not looking for the correct tags or directives. Or maybe
I my assumptions are wrong and I need to test in another way.

Thank you,
�-Lisa&

                       
                                          

Lisa Gerlich
Senior Network/Systems Administrator
Northside Independent School District
ITS  Department
San Antonio, TX
PH:  210-706-8577
FX:  210-706-8877
EM:  lisagerlich@nisd.net

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: mod_expires/mod_headers do not appear to work

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 27 Mar 2002, Lisa Gerlich wrote:
> After modifying httpd.conf, I restarted the server with "apachectl
> restart".  I loaded a page from a server into my browser and viewed the
> source.  I was expecting to see header entries suggesting rules for the
> browser to use when caching,  but I don't see anything like that between
> the <head> </head> tags.  Perhaps I don't know what I am looking for.  I
> cannot find anything in my html/xhtml book (O'Reilly - 4th edition)
> that refers to any code that will help to control caching behavior.

The headers that Apache adds are "real" HTTP headers, not the "meta"
headers that you sometimes see in HTML.  HTTP headers are not sent as part
of the webpage.  This is what you want, because most proxies only honor
those headers if they are sent as proper HTTP headers.

If you want to see them, you can use something like
lynx -head -dump http://yoursite.example.com/

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org