my 4 cents...
1) It definitly makes sense to specify Last-Modified and Expires from a
CGI-Script. Take something like freshmeat.net (I don't checked if they
use the headers). It would make sense to set Expires to smthg like 1 hour
and Last-Modified to the time when the database was last time modified. Then
the content could be cached from proxies which takes load from the
server and also shortens response times for the user. Same true for a
web view of a discussion list where a few times a day new articles come
in and you offer various views (subject/thread/subthread). It doesn't
make sense to recreate all possible views to a part of the list every
time a new article drop in. Instead create them on demand (and probably
cache the output locally too for a while) but tell the client about
Last-Modified.
2) To work around the problem with not caching '?' (and with the problem
that some users find URLs like this strange looking) I usually use
PATH_INFO and append the parameters to the script as a path (smthg like:
http://server/script/view-as-thread/msg004). If the request is a result
of the user filling out a form I sometimes redirect the user based on
the input to a better locking (cachable, but dynamically created) page.
3) Why do you think that http://server/script?A=10&B=4 has to be the
same as http://server/script?B=4&A=10 ?? Probably your script does it
this way but I know of any rule who enforces that behavior.
4) I think URL's with '?' in it should be cachable (but maybe set
Expires to 0 unless a Expires header is given). For contents which
should not be cached POST requests or a proberly defined Expires header
should be used
On Tue, Mar 02, 1999 at 10:49:44AM +0100, Ole Moller wrote:
> Written by you 10:04 02-03-99 +0100,Andreas J. Koenig
> >If people installing squid really follow that recommendation, all my
> >careful considerations about Last-Modified and Expires headers are
> >worthless because *all* my URIs contain questionmarks.
> I really dont see the point. Either a web-page is static or it's dynamic
> and in the last case it is likely to change every time (eg a counter) or it
> is unlikely that the same request is requested twice (eg searches on
> altavista).
> You dont tell what your script really do, but if it has a finite
> possibilities of input variables and a finite output pages (as I suppose
> because you want the pages cached), then you should consider to make a
> script that dumps all the possible pages one time for all as static pages,
> with the appropriate headers.
> If this is not possible - then this is truly a cgi-script that I dont want
> to cache because I dont have infinite disk-space.
> Regards
> --
> Ole Møller olm@cybercity.dk, Sysadm CyberCity Internet
> Finish your mail packet! Children are offline in India.
Received on Tue Mar 02 1999 - 08:24:33 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:45:06 MST