[svlug] progress indicator for cgi...

Don Marti dmarti at zgp.org
Tue Sep 28 08:43:01 PDT 2010


begin George Georgalis quotation of Mon, Sep 27, 2010 at 06:18:42PM -0700:

> I have a simple task which is invoked by hitting
> the specific url because of a couple apache directives
> 
>         AddHandler cgi-script .cgi
>         Options +ExecCGI
> 
> problem is, it can take 10 to 15 seconds for the
> page to complete and I want the client to know their
> request is pending.

Can you fork and build the result page in a temporary
file, then have the script return a cookie and the
meta refresh page with a 10-15s delay?  The second
time the browser hits, serve the temporary file if
present. (Of course you will have to use file locking
and temp file naming carefully to avoid building more
than one temp file per client.)

-- 
Don Marti                    
http://zgp.org/~dmarti/
dmarti at zgp.org




More information about the svlug mailing list