SPUG: Showing progress in the browser

Fred Morris m3047 at inwa.net
Thu Jan 22 18:55:06 CST 2004

At 10:13 AM 1/22/04, dan at concolor.org wrote:
>On Thu, Jan 22, 2004 at 09:33:08AM -0800, Douglas Kirkland wrote:
>> Hash: SHA1
>> On Thursday 22 January 2004 09:14, Luis Medrano wrote:
>> > List,
>> >
>> > I have a question I would like to show the progress on the CGI on the
>> browser for example 10%, 20% 40% of complision. or something like that...Any
>> one knows how I can do this??..
>> I do not know how this can be done.  Most site that show how much is done do
>> it by cheating.  They will take a good guess on how long it will take and
>> display that information.
>It occurs to me that you might be able to hold the http connection open
>and feed the data through at a very slow rate. Perhaps along the lines
>of a dot every second or so. This might cause problems
>with some browsers timing out on the connection.

Take a look at


which does exactly that. ;-) (Yes, it's written in Perl, and I've used as
similar approach to show the progress of browser-instigated tar operations
for instance.)

>Another method I've actually seen is to use the refresh meta tag and
>base it on a guesstamate of how long it should take.

You could do that, or you could use JavaScript on a timer which causes a
reload every so often.


Fred Morris
fredm3047 at inwa.net (I-ACK)

More information about the spug-list mailing list