Expiration of the result of form submission?
Posted on 1997-12-08
As part of a www-accessible database, I have a cgi script that processes form input submitted by the POST method. The cgi script takes about 15 seconds to return. When it does the browser displays a blank page. When I view the page source it would contain:
<TITLE>Missing Post reply data</TITLE>
This document resulted from a POST operation and has expired from the
cache. If you wish you can repost the form data to recreate the
document by pressing the <b>reload</b> button.
When I hit the reload button. the page loads up as expected with the output of the cgi script. The output of the cgi script in this case is actually a vrml world. It is preceded with the appropriate Content-type header and the browser starts up the vrml viewer normally and displays
the vrml world.
The Question is how to avoid having to reload the the page to get the browser to display it. I tried adding a couple of header fields to the cgi script response to get it to extend the 'freshness' of the reply. I added an Expires: time that is few minutes ahead of the server time to give the reply ample time to get to the browser. I also added a Cache-Control: max-age directive to try to achieve the same result. neither the Expires time or max-age made a difference. Following is the output of the cgi script taken directly from a connection to port 80 (to
get all the headers).
HTTP/1.1 200 OK^M
Date: Sun, 07 Dec 1997 17:52:36 GMT^M
Expires: Sun, 07 Dec 1997 17:55:42 GMT^M
#VRML V2.0 utf8^M
My platform is SGI IRIX6.3, http server: apache 1.2.1 browser: communicator 4.04