Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: push_handler and status page question.

by sutch (Curate)
on Mar 31, 2001 at 01:06 UTC ( #68505=note: print w/ replies, xml ) Need Help??


in reply to push_handler and status page question.

One way to handle this is to use an HTML redirect. This has the added benefit of freeing memory in use by mod_perl processes that would otherwise be used for each waiting client connection.

An outline of how I've planned to handle it (note: I haven't implemented it yet, but plan to soon):

receive request; if (request has no job_id) { create new job_id; start processing external commands (providing job_id); return an HTTP redirect with a 10 second pause, such as: <meta http-equiv="REFRESH" content="10;URL=http://sample.com/?id=j +ob_id"> } else { if (external commands have completed) { return results; } else { return the HTTP redirect again; } }


Comment on Re: push_handler and status page question.
Download Code
Re: Re: push_handler and status page question.
by one4k4 (Hermit) on Mar 31, 2001 at 03:25 UTC
    See, I never really know when the stored procedure will end and return the result set. So I'd really like the 'waiting...' web page to just sit there and refresh with the result set when the SP is done. (As if the connection from $r->send_http_header(...) was kept open... ) This could be anywhere from 3 seconds to 3 minutes. So a content - redirect would probably, most likely, happily, not work. But alas, it is a good idea though.

    _14k4 - webmaster@860.org (www.poorheart.com)
      I know that one of the major browsers, and maybe just one version of that browser, will redraw the page when new headers are returned. But if you cannot guarantee that your users will use that browser, either IE or NS, then this solution is not viable.

      You may be able to do something with JavaScript, where your image is returned and then hidden when the results are returned.

      I do not understand why you believe the HTTP redirect will not work. If you are concerned about the user having to wait an extra 9 seconds (when using a 10 second delay) then decrease the delay to 5 seconds or even 1 second.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://68505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2014-09-01 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls