You are here: Re: How initiate update for proxy server? « PHP Language « IT news, forums, messages
Re: How initiate update for proxy server?

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация