Re: page reloads

At 5:58 AM 5/31/95, Jon Knight wrote:
>On Wed, 31 May 1995, Steve Nisbet wrote:
>> maybe this has been answered before, but is there currently a method to force
>> a document reload, say after a form has been processed. I suppose there isnt
>> at the moment. I was wondering if anyone else would find it useful.
>
>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. When
you are doing an order form with a list of things that you have ordered so
far, it's important to make sure that the document that is displayed is
fresh, not from the cache.  As far as I know there are only two ways to
guarantee the what you want.

1) Have the order script be the thing that spits out the form.
In other words.
        /cgi-bin/takeorder
spits out an empty order form when invoked with no arguments, and it's
forms just resubmit to itself.

2) Have an order form and an order script.  The order form should set the
Expires header and Pragma: no-cache (works for Netscape). However, even
that won't work with some caching servers, so you need to go one more step.
When the "takeorder" script redirects back to the order form, have it pass
a unique argument everytime (e.g.
http://www.somewhere.com/order.html?Defeat-Cache=xxx, where xxx is the
result of "time(0)" or something).  The html file will ignore the argument,
but the presence of the argument will defeat any caching mechanism.

Anyone have a third option?

Kee Hinckley      Utopia Inc. - Cyberspace Architects    617/721-6100
nazgul@utopia.com                               http://www.utopia.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

Received on Wednesday, 31 May 1995 07:04:45 UTC