Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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!


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2021-10-27 01:55 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (91 votes). Check out past polls.