in reply to Re: Emulate CGI "server push" to show real time status of CGI script for all browsers
in thread Emulate CGI "server push" to show real time status of CGI script for all browsers

I second the suggestion of using HTTP refresh. It was the only way I found to reliably update data on various browsers (IE being particularly crappy about server-push).

My strategy is to spawn a background process that does the time-consuming work while redirecting the browser to a progress page. The background process periodically writes to the progress page. You can even change the refresh time in the meta tag on the progress page if you have an idea of how long you expect different steps in the processing to take.

A tip I can pass along about doing this, when forking off a child process in a cgi script, make sure to close STDOUT and STDERR in the child or the browser will wait for the child to complete.

  • Comment on Re: Re: Emulate CGI "server push" to show real time status of CGI script for all browsers

Replies are listed 'Best First'.
Re: Re: Re: Emulate CGI "server push" to show real time status of CGI script for all browsers
by sgifford (Prior) on Oct 01, 2003 at 02:19 UTC
    I did exactly this for my CGIBurn application. Source code is there if you'd like to poach ideas; the code itself is GPL'd.
Re: Re: Re: Emulate CGI "server push" to show real time status of CGI script for all browsers
by Anonymous Monk on Oct 01, 2003 at 06:35 UTC
    IE being particularly crappy about server-push.

    IE does not support Server-Push.