Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: cgi buffer flush

by erikharrison (Deacon)
on Mar 09, 2002 at 15:52 UTC ( #150578=note: print w/ replies, xml ) Need Help??


in reply to cgi buffer flush

You were clever to make the filehandle hot. It would have been exactly what I would have done to solve this problem. In fact you should always make STDOUT hot in a CGI program to ensure that the headers get to the browser in order.

However, your problem has to do with two things: Apache behavior and browser behavior. As to the first, I'm no expert at Apache, but I do know that Apache will wait until the program finishes execution before sending anything to the browser - hence the 10 second wait until you see anything. As to the second, you can't be sure when the browser will parse and display the page. It might wait until it gets the whole page, it might parse and display in block - every 8k or so. I don't know. After all the browser doesn't know how tags at the bottom of your page may affect the top. These problems taken to account, it may be obvious that a client side program probably can't solve your problem - you'll need some client side solution - Flash, Curl, or even JavaScript

Good Luck!

Cheers,
Erik


Comment on Re: cgi buffer flush

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-12-28 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls