Re: page reloads

Brian Behlendorf (brian@organic.com)
Wed, 31 May 1995 19:16:56 +0500


On Wed, 31 May 1995, Jon Knight wrote:
> On Wed, 31 May 1995, Kee Hinckley wrote:
> > >Just have the CGI script that processes the FORM return the required
> > >document?
> >
> > I believe the point was that this doesn't necessarily force a reload.
>
> Erm, it should do. Proxy caches shouldn't be caching any returns from
> CGI scripts as these are likely to be dynamic documents (ie they can
> change between invocations).

Again: there is *no* *way* a proxy server, or a client cache, can tell
if a GET request is made to a CGI script or a regular file. Period. The
only thing proxy caches really have are Last-Modified and Expires:
headers, and optionally Pragma: no-cache. If none of those headers are
present in the response, then the cache can presume that it can't cache
the data. However, POST requests should indeed never be cached, since
by definition (though not always by practice) they modify some data on
the web server and are thus not idempotent.

> Maybe there are some really broken caches that cache the output of CGI
> scripts that I wasn't aware of though...

The more common proxy caches are, er, erroneous in many places, but this
isn't one of them.

Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com brian@hyperreal.com http://www.[hyperreal,organic].com/