|
Posted by Colin McKinnon on 06/01/05 11:55
Erik Kullberg wrote:
> I manage a home page, the purpose of wich is to keep available certain
> information, wich may change. Some of the readers are sitting behind a
> proxy server. Sometimes they do not observe that I have updated the
> information until it's too late, since their proxy server does not update
> frequently enough.
>
> Can I influence this via my php code?
>
Yes, but bear in mind that not all proxies/browsers conform to the rules.
Negatiated content should always be refreshed, so simply adding a GET
parameter to the end of every href may fix the problem (you could try doing
something clever by creating a session and setting session.use_trans_sid).
Alternatively you could try to ask the proxy/browser to NOT cache the
object:
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");/* Date in the past*/
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); /* always
modified*/
header("Cache-Control: no-cache, no-store, must-revalidate");/* HTTP/1.1 */
(copy and pasted from a suggestion by Ron Holland)
HTH
C.
[Back to original message]
|