[svlug] progress indicator for cgi...

George Georgalis george at galis.org
Mon Sep 27 18:18:42 PDT 2010


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.

The simple approach is to respond with some html
saying working... then throw

<META HTTP-EQUIV="Refresh" CONTENT="0; URL=./results/">

in the body when the task is done. Works great in
curl but with a graphical browser the "working..."
part isn't rendered until the end of the script is
printed, so you never see the message (unless you
raise the delay).

So I was wondering what you all here think is good way to indicate
the request is in progress. So far the solutions I'm thinking of
are really complicated to avoid a blank page while processing and
immediate loading when the processing is done.

Any ideas? I'm using shell but I'd be happy to do wsgi/python if
there is a good solution in that direction.

-George






More information about the svlug mailing list