in reply to Re: cgi with sleep
in thread cgi with sleep

Probably using of javascript is the best choice here, but we can do something on sever side:
#!/usr/bin/perl use warnings; use strict; $|=1; use CGI qw/:standard/; print header; print "line one<br>\n"; print ' ' x 4096; sleep(3); print "line two<br>\n"; print ' ' x 4096; sleep(3); print "line three<br>\n"; print ' ' x 4096; sleep(3); print "line four\n"; print "<br>\n"; sleep(3);

Replies are listed 'Best First'.
Re: Re: Re: cgi with sleep
by eserte (Deacon) on Apr 01, 2004 at 11:34 UTC
    This may force flushing output buffers on some proxies. Some proxies maybe need larger padding. Some browsers (notably older ones) always wait until the whole response is received before rendering.