|
|
ru.cgi.perl- RU.CGI.PERL ------------------------------------------------------------------ From : Valery 2:5020/400 01 Aug 2002 08:16:51 To : Oleg Poltoratskiy Subject : Re: сигналы -------------------------------------------------------------------------------- Oleg Poltoratskiy <matrixmaster@kubic.ru> пишет: OP>> Это случаем не "Non Parced OP>> Headers" или как OP>> это там называют в Апаче? OP> что это? OP> дирректива? =========== Цитата из доки по CGI.pm ===================== Server Push CGI.pm provides four simple functions for producing multipart documents of the type needed to implement server push. These functions were graciously provided by Ed Jordan <ed@fidalgo.net>. To import these into your namespace, you must import the ``:push'' set. You are also advised to put the script into NPH mode and to set $| to 1 to avoid buffering problems. Here is a simple script that demonstrates server push: #!/usr/local/bin/perl use CGI qw/:push -nph/; $| = 1; print multipart_init(- boundary=>'----here we go!'); foreach (0 .. 4) { print multipart_start(- type=>'text/plain'), "The current time is ",scalar(localtime),"\n"; if ($_ < 4) { print multipart_end; } else { print multipart_final; } sleep 1; } This script initializes server push by calling multipart_init(). It then enters a loop in which it begins a new multipart section by calling multipart_start(), prints the current local time, and ends a multipart section with multipart_end(). It then sleeps a second, and begins again. On the final iteration, it ends the multipart section with multipart_final() rather than with multipart_end(). .... Only Netscape Navigator supports server push. Internet Explorer browsers do not. .... =========== конец цитаты ================================= Вот насчёт того что IE не поддерживает этого сказать не могу - с ним не пробовал. -- Отправлено через сервер Форумы@mail.ru - http://talk.mail.ru --- ifmail v.2.15dev5 * Origin: Talk.ru (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.cgi.perl/6488d98bc8c5.html, оценка из 5, голосов 10
|