Re: page reloads

[NB: I seem to have really stirred up a hornets nest here - I don't think 
I've ever had so many replies to posting to _any_ mailing list!  So I'm 
going to reply to the list in one go rather than reply separately to lots 
of people.]

My comments about just letting the CGI script return the document that 
the browser should reload has pulled up a few interesting points:

1) Some people seemed to think I was implying sending a redirect from the
CGI script (or that's what they would have done).  I didn't mean that at
all - I intended the script to return the document to be reloaded not
redirect the browser.  An HTTP Redirect response from the script could
easily result in the browser retrieving a cached copy of the document. 
Some people have pointed out that the CGI script might not know where the
document to be loaded is located which is possible but unlikely, mainly
because it would have to know where it is to issue the HTTP redirect. 

2) Clients and caches can handle Expires: and Pragma: nocache headers
badly.  True.  However, I use X Mosaic and a Harvest object cache all the
time (and a CERN caching proxy before that) and I can't say that I really
notice too many problems associated with this (plenty of other problems to
do with the caches though! :-) ).  The biggest problem appears to be when
someone has a non-CGI document that includes dynamic information into an
otherwise static HTML document (counters, etc) and the remote server
doesn't send any useful headers to the cache.  This has resulted in me
hacking my copy of Mosaic to have some ``Really Reload'' and ``Open
Direct'' options tucked away in it.  IMHO things sitting in cgi-bin's pretty
much always seem to work ok though.  YMMV. 

3) If the CGI script is invoked as a result of the POST method in a FORM, 
the output shouldn't be cached anyway.  So maybe the moral of the story 
is always use POST insituations like this... :-)

Lastly, the reason I made the comment was basically that's what I do with 
lots of the CGI scripts I write (the good old IETF way of basing 
things on implementation experience :-) ).  Its interesting that so many 
people feel that they would have problems with these forms.  It makes me 
wonder how many of my users have had these problems and just not told me 
about them... :-|

Jon

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jon Knight, Researcher, Sysop and General Dogsbody, Department of Computer
Studies, Loughborough University of Technology, Leics., ENGLAND.  LE11 3TU.
*** Nothing looks so like a man of sense as a fool who holds his tongue ***

Received on Thursday, 1 June 1995 04:47:38 UTC