Re: Proxying PHP Pages

From: Bruce Campbell <bc@dont-contact.us>
Date: Sat, 12 Dec 1998 10:43:16 +1000 (EST)

On Fri, 11 Dec 1998, Steve Judge wrote:

> Hello everyone,
> We just recieved the email below from a gaming company on the internet at
> www.digitaladdiction.com concerning caching of PHP pages and cookies.

I've recently had a series of (vaguely rude) emails from gay.com about
similar :(

> A couple of questions:
> 1) I didn't think that squid cached cookies ?

It *shouldn't*. There are snippets of code in there to not cache cookies,
however.... I'm a bit uncertain about whether it doesn't in 100% of cases,
most notably when short cookie expiry and the origin server has a skewed
clock (like 5 minutes off, either direction). Good reason to be running
ntp ;)

> 2) Dynamic PHP pages, are these the same as cgi's and should we include
> them under the stoplist part not to cache or fetch from neighbors etc ?

Yes and no. Some are very dynamic, however others are less so. You might
like to mail them back pointing them at

http://www.php3.net/manual/function.header.php3

which, among other things, suggests:

   PHP scripts often generate dynamic HTML that must not be cached by the
   client browser or any proxy caches between the server and the client
   browser. Many proxies and clients can be forced to disable caching
   with

  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, must-revalidate"); // HTTP/1.1
  header("Pragma: no-cache"); // HTTP/1.0

> I've also emailed the company concerned suggesting that their product
> should be more proxy aware as they are a fact of life on the internet now
> instead of adding isp's to a ban list that are running " aggressive
> cacheing practices " as they put it.

Most of the ones I've had troubles from have been US-based companies, such
as www.gay.com's java chat which have stated in part 'ISPs such as AOL and
Australian-based do not rotate their caches frequently enough so you are
getting' (implied because these ISPs are lazy) 'incorrect data'

Hmph. Bloody US-based arrogant etc etc. (then they asked me to dump my
cache completely.... not bloody likely ;) )

--==--
Bruce.

Systems Administrator
    Hub Communications.
Received on Fri Dec 11 1998 - 17:40:06 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:43:38 MST