Forum Moderators: phranque

Message Too Old, No Replies

Always Have To Hit Refresh To See Content

Need to hit refresh to see updated pages

         

dttyszka

2:22 am on Jan 7, 2006 (gmt 0)

10+ Year Member



I am running Apache 2.55, and no matter content I add, my visitors always have to hit refresh to see the updated content. I am wondering if there is an Apache parameter that I can tweak to cause the pages to always be served up. Or is this not an Apache issue at all? Any help is greatly appreciated. Thanks in advance!

jdMorgan

3:44 am on Jan 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is probably a caching issue.

If you want to prevent this from happening, you have to configure your server to do so.


# Set up Expires and Cache Control headers
ExpiresActive On
# Set http header to expire everything 2 hours from last access, set must-revalidate
ExpiresDefault A7200
# Apply a customized Cache-Control header to frequently-updated files
Header unset Cache-Control:
Header append Cache-Control: "no-cache, must-revalidate"

If you don't control this, then browsers and intervening caches in the network between the client and your server will save old copies of your pages 'as long as they want to' and server them in preference to sending the request all the way to your server. This reduces network traffic, which is good, but sometimes they save your page for an hour, and sometimes they save your page for a day...

See Apache mod_headers and mod_expires.

Jim

dttyszka

5:07 am on Jan 8, 2006 (gmt 0)

10+ Year Member



Jim,
Thanks for sending me in the right direction. And I apologize if this follow-up is a stupid question, but I'm struggling to get those modules up and running. I've tried compiling Apache with the following configuration:

./configure --enable-so --enable-headers --enable-expires

But the modules do not appear in the modules folder and therefore can't be loaded? What am I doing wrong? Any help is very much appreciated!

jdMorgan

6:56 am on Jan 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not a stupid question at all. As a matter of fact, I've never compiled Apache myself, and I can't even answer it. :(

Hopefully, someone who has done this before will have an answer for you!

Jim

dttyszka

8:37 pm on Jan 8, 2006 (gmt 0)

10+ Year Member



OK, I believe I have successfully compiled and installed mod_expires. I did so with the configuration:

./configure --enable-so --enable-ssl --enable-mods-shared=expires

Now, can someone tell me why this worked and generated mod_expires.so but using --enable-expires does not? I am very confused, and again any help is appreciated.