The problem is not the browser timing out, but rather that the process waits until the end to display the results.

You may have a different problem, but merlyn's article is still a possible solution. Have your lengthy process fork off and write its output to a file, then have the CGI refresh every X seconds, reading that output file, and displaying the results. Perhaps you could even parse the output file and make the results a bit more user friendly (this is just speculation -- the output may already be user friendly).

You may also find that your lengthy process buffers its output writing to the file, though. In that case, you can investigate some of the solutions sgifford recommended.


In reply to Re^3: Long Process Waits Until End to Display Results by revdiablo
in thread Long Process Waits Until End to Display Results by C_T

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.