views:

23

answers:

1

I have a CGI script that takes a few minutes to run. I want to keep it very simple. Currently, it prints some information about the process and then starts running it. When complete, it shows the result of the job.

It works perfectly when I load it in telnet. However, Firefox doesn't show the header information until after the process is complete. Is there some JavaScript call or DOM setting that I can use to tell the browser to load the information it already has and hold tight?

Again, I just want something simple as the script already works quite well as-is.

A: 

If the header information has HTML tags that aren't closed until the process is complete, the browser may wait till it gets the closing tag before it renders the HTML.

You can try restructuring your HTML to avoid that or use multipart/x-mixed-replace to push updates as your CGI script progresses.

Uh Clem
Interesting hint. I am using valid XHTML transitional data. The results are currently produced as additional content at the end of the current HTML document. I tried encapsulating the headers in a span and a div. Neither helped. I may be stuck using AJAX to dynamically load the data.
User1