Home > Archive > PHP Language > June 2005 > How initiate update for proxy server?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How initiate update for proxy server?
|
|
| Erik Kullberg 2005-05-31, 3:57 pm |
| 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?
/ Erik Kullberg
| |
| Colin McKinnon 2005-06-01, 8:57 am |
| 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.
|
|
|
|
|