Unless you want to embark on the strange and perilous road of trying to implement server-push, you are stuck with the default http environment, which is, client pull. What that means is you can only send stuff to the client when it asks for it. Theres no way, short of server-push, to magically send data to a client unless it requests said data.
In this case the best bet is to probably try to emulate server push by having three 'scripts' (or modes or whatever).
Mode 1 simply starts the process then sends the user to mode 2.
Mode 2 checks if the child process is done. If it's done, it redirects the client to mode 3, other wise it simply says "wait 3 seconds and ask me again". You can acheive this "wait x seconds and ask me again" a number of ways, most of them involving the refresh header. For example:
<META HTTP-EQUIV="Refresh" CONTENT="10; URL=url"> in the html. Or javascript or an actual http refresh header.
Mode 3 displays the results of the child jobs.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.