[Suggestion] No-cache header

Posted by Samson on Sun 02 Oct 2005 05:13 PM — 4 posts, 21,797 views.

USA #0
A suggestion. Don't know if it's just the proxy at work or what but very often when I go to read the forum from there I am forced to do a reload several times to convince it that I want to see current data. It will often be holding some very stale copies in the cache. Maybe a no-cache header or something would solve this? It doesn't happen when I'm at home and not using a proxy.
Australia Forum Administrator #1
I'm not sure I can influence the HTTP headers. I don't notice the problem myself. Might be an aggressive proxy server that re-serves up the same page even when you hit refresh.
USA #2
Yeah, that's what I'm thinking too, but I can't exactly go to the proxy admins and ask them to knock it off either :P

You might want to look into this:
http://us2.php.net/manual/en/function.header.php

Has some information that looks relevent, including an example of a no-cache header directive.
Australia Forum Administrator #3
OK, I added this to the header:


Cache-Control: no-cache, must-revalidate


See if that works better. :)