diff options
Diffstat (limited to 'files/ru/web/api/server-sent_events/index.html')
-rw-r--r-- | files/ru/web/api/server-sent_events/index.html | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/files/ru/web/api/server-sent_events/index.html b/files/ru/web/api/server-sent_events/index.html new file mode 100644 index 0000000000..f77249df1b --- /dev/null +++ b/files/ru/web/api/server-sent_events/index.html @@ -0,0 +1,72 @@ +--- +title: Server-sent events +slug: Web/API/Server-sent_events +translation_of: Web/API/Server-sent_events +--- +<p>{{DefaultAPISidebar("Server Sent Events")}}</p> + +<p>По традиции, web-страница должна отправить запрос на сервер, чтобы получить новые данные; это то, как страница получает данные с сервера. Server-sent events дают возможность серверу отправлять новые данные web-странице в любое время, отсылая сообщения web-странице. Такие входящие сообщения могут расцениваться как <em><a href="/en-US/docs/DOM/event">Events</a> + data</em> внутри web-страницы.</p> + +<h2 id="Понятия_и_применение">Понятия и применение</h2> + +<p>Чтобы изучить, как использовать server-sent events, обратитесь к статье <a href="/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">Using server-sent events</a>.</p> + +<h2 id="Interfaces" name="Interfaces">Interfaces</h2> + +<dl> + <dt>{{domxref("EventSource")}}</dt> + <dd>Defines all the features that handle connecting to a server, receiving events/data, errors, closing a connection, etc.</dd> +</dl> + +<h2 id="Examples">Examples</h2> + +<ul> + <li><a href="https://github.com/mdn/dom-examples/tree/master/server-sent-events">Simple SSE demo using PHP</a></li> +</ul> + +<h2 id="Specification">Specification</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', '#server-sent-events', 'Server-sent events')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td></td> + </tr> + </tbody> +</table> + +<h2 id="See_also" name="See_also">See also</h2> + +<h3 id="Tools" name="Tools">Tools</h3> + +<ul> + <li><a href="https://github.com/EventSource/eventsource">EventSource polyfill for Node.js</a></li> + <li>Remy Sharp’s <a class="link-https" href="https://github.com/remy/polyfills/blob/master/EventSource.js">EventSource polyfill</a></li> + <li>Yaffle’s <a class="link-https" href="https://github.com/Yaffle/EventSource" title="https://github.com/Yaffle/EventSource">EventSource polyfill</a></li> + <li>Rick Waldron’s <a class="link-https" href="https://github.com/rwldrn/jquery.eventsource">jquery plugin</a></li> + <li>intercooler.js <a href="http://intercoolerjs.org/docs.html#sse">declarative SSE support</a></li> +</ul> + +<h3 id="Related_Topics" name="Related_Topics">Related Topics</h3> + +<ul> + <li><a href="/en-US/docs/AJAX" title="AJAX">AJAX</a></li> + <li><a href="/en-US/docs/JavaScript" title="JavaScript">JavaScript</a></li> + <li><a href="/en-US/docs/WebSockets" title="WebSockets">WebSockets</a></li> +</ul> + +<h3 id="Other_resources">Other resources</h3> + +<ul> + <li>A <a href="http://hacks.mozilla.org/2011/06/a-wall-powered-by-eventsource-and-server-sent-events/" title="http://hacks.mozilla.org/2011/06/a-wall-powered-by-eventsource-and-server-sent-events/">Twitter like application</a> powered by server-sent events and <a class="link-https" href="https://github.com/mozilla/webowonder-demos/tree/master/demos/friends%20timeline" title="https://github.com/mozilla/webowonder-demos/tree/master/demos/friends timeline">its code on Github</a>.</li> + <li><a href="http://dsheiko.com/weblog/html5-and-server-sent-events" title="http://dsheiko.com/weblog/html5-and-server-sent-events">HTML5 and Server-sent events</a></li> + <li><a href="http://rajudasa.blogspot.in/2012/05/html5-server-sent-events-using-aspnet.html" title="http://rajudasa.blogspot.in/2012/05/html5-server-sent-events-using-aspnet.html">Server-sent events using Asp.Net</a></li> +</ul> |