May 27, 2003, 11:18 AM
Post #3 of 3
Hi !!! It's me again ...
Re: [Woodoo] Server-push technology ... ?
[In reply to]
Well ... I've found some articles ... read them ... tried to programm the simple script and faced to one problem ... data buffering and STDIO strem flushing ...
So, here is an example how it is possible to display some lines (messages) every second ...
$Marker = '-Marker-';
$Spacer = " \n" x 300;
print "Content-type: ",
print "<META HTTP-EQUIV=\"Content-type\" CONTENT=\"text/html;\">\n\n",
# wait a little bit
# end of script
So, that works fine when $Spacer = " \n" x 300; and if to look in HTML code of the Output page you will see a lot of spaces between the lines (300 times \n from line to line). Operator $|=1; has to cancel buffering but looks like it doesn't work. For a data transfer it is required certain amount of bits to send to the Client ... if you define $Spacer = " \n" x 10; or so then that will be no outprinting messages every second but all in once after several seconds when the required amount of bits is reached ... and that is sucks !!! I want to modify a chat script to support server-push technology - that saves your eyes, time and trafic ... and was trying to find some info on how to do it ... found ... tested ... and nothing works ... well ... maybe works for Netscape (as it is mentioned in many articles) but doesn't work for my IE. I saw several chats with this method working fine with IE !!! ... So, please, if someone has ideas what and how to do this stuff - share !!!
Thank you very much in advance !!!