I have this Perl script sitting in the cgi-bin folder of my Apache server:
#!/usr/bin/perl
use strict;
use warnings;
$| = 1;
print \"Content-type: text/ht
What you are wanting to achieve is possible -- browsers generally render what it has received so far, even if it is not the complete document, provided there is sufficient markup to be able to render anything at all. I'm wondering however why you use \r\n
for some output and just \n
for others -- you should be consistent and use \n
throughout. Additionally, you are specifying a content type of text/html, but not providing any html headers (
) before your content.
However, the "modern" way to do this is to return the page output immediately, but leave the part you want to update later as an empty