arc_of_descent has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
This is my first post, so plz excuse any
noviceness that i may display!
I've been cracking my head against output buffering in cgi.
I'm using mod_perl with apache 1.3.22
Here is what i'm trying to do:
Now what i expect in the browser is that the "Sleeping" string should be output and then 10 seconds later, the "Wide Awake" string should appear.
But unfortunately, both appear together after 10 seconds.
How do i seperate the two?
I basically want this for better html responses, as i do a lot of processing in my cgi and i want the user to know whats going on behind the scenes.
Does it have something to do woth apache buffering?
Thanx.
--
arc_of_descent
I've been cracking my head against output buffering in cgi.
I'm using mod_perl with apache 1.3.22
Here is what i'm trying to do:
#!/usr/bin/perl # make output filehandle HOT $| = 1; print "Content-Type: text/html\r\n\r\n"; print "Sleeping for 10 seconds<br>\n"; sleep 10; print "Wide Awake Now.<br>\n";
Now what i expect in the browser is that the "Sleeping" string should be output and then 10 seconds later, the "Wide Awake" string should appear.
But unfortunately, both appear together after 10 seconds.
How do i seperate the two?
I basically want this for better html responses, as i do a lot of processing in my cgi and i want the user to know whats going on behind the scenes.
Does it have something to do woth apache buffering?
Thanx.
--
arc_of_descent
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: cgi buffer flush
by io (Scribe) on Mar 09, 2002 at 11:10 UTC | |
by fuzzyping (Chaplain) on Mar 09, 2002 at 12:06 UTC | |
by dorko (Prior) on Mar 09, 2002 at 18:29 UTC | |
by dvergin (Monsignor) on Mar 09, 2002 at 20:49 UTC | |
by fuzzyping (Chaplain) on Mar 09, 2002 at 18:39 UTC | |
by dvergin (Monsignor) on Mar 09, 2002 at 20:55 UTC | |
by zengargoyle (Deacon) on Mar 16, 2002 at 06:41 UTC | |
Re: cgi buffer flush
by cjf (Parson) on Mar 09, 2002 at 10:48 UTC | |
by arc_of_descent (Hermit) on Mar 09, 2002 at 11:11 UTC | |
Re: cgi buffer flush
by erikharrison (Deacon) on Mar 09, 2002 at 15:52 UTC | |
Re: cgi buffer flush
by zentara (Archbishop) on Mar 09, 2002 at 18:17 UTC | |
Re: cgi buffer flush
by arc_of_descent (Hermit) on Mar 09, 2002 at 19:50 UTC |
Back to
Seekers of Perl Wisdom