diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:56:40 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 12:56:40 +0100 |
commit | 310fd066e91f454b990372ffa30e803cc8120975 (patch) | |
tree | d5d900deb656a5da18e0b60d00f0db73f3a2e88e /files/zh-cn/server-sent_events/index.html | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-310fd066e91f454b990372ffa30e803cc8120975.tar.gz translated-content-310fd066e91f454b990372ffa30e803cc8120975.tar.bz2 translated-content-310fd066e91f454b990372ffa30e803cc8120975.zip |
unslug zh-cn: move
Diffstat (limited to 'files/zh-cn/server-sent_events/index.html')
-rw-r--r-- | files/zh-cn/server-sent_events/index.html | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/files/zh-cn/server-sent_events/index.html b/files/zh-cn/server-sent_events/index.html deleted file mode 100644 index 4a9d6e0630..0000000000 --- a/files/zh-cn/server-sent_events/index.html +++ /dev/null @@ -1,77 +0,0 @@ ---- -title: Server-sent events -slug: Server-sent_events -tags: - - API - - NeedsTranslation - - Server-sent events - - TopicStub -translation_of: Web/API/Server-sent_events ---- -<div>{{DefaultAPISidebar("Server Sent Events")}}</div> - -<p>一个网页获取新的数据通常需要发送一个请求到服务器,也就是向服务器请求的页面。使用 server-sent 事件,服务器可以在任何时刻向我们的 Web 页面推送数据和信息。这些被推送进来的信息可以在这个页面上作为 <em><a href="https://wiki.developer.mozilla.org/en-US/docs/DOM/event">Events</a> + data</em> 的形式来处理。</p> - -<h2 id="概念与使用">概念与使用</h2> - -<p>可以前往我们这篇文章 <a href="/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events">《使用 “server-sent events</a>”》 学习怎么使用 server-sent events。</p> - -<h2 id="接口">接口</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="示例">示例</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="规范">规范</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">规范</th> - <th scope="col">状态</th> - <th scope="col">备注</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="参见">参见</h2> - -<h3 id="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">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="相关话题">相关话题</h3> - -<ul> - <li><a href="/en-US/docs/AJAX">AJAX</a></li> - <li><a href="/en-US/docs/JavaScript">JavaScript</a></li> - <li><a href="/en-US/docs/WebSockets">WebSockets</a></li> -</ul> - -<h3 id="其他资源">其他资源</h3> - -<ul> - <li>一个使用 server-sent events 的、类似 <a href="http://hacks.mozilla.org/2011/06/a-wall-powered-by-eventsource-and-server-sent-events/">Twitter</a> 的应用程序,代码存放在这里:<a href="https://github.com/mozilla/webowonder-demos/tree/master/demos/friends%20timeline">Github</a>.</li> - <li><a href="http://dsheiko.com/weblog/html5-and-server-sent-events">HTML5 和 Server-sent events</a></li> - <li>使用<a href="http://rajudasa.blogspot.in/2012/05/html5-server-sent-events-using-aspnet.html">Asp.Net</a> 的 <a href="http://rajudasa.blogspot.in/2012/05/html5-server-sent-events-using-aspnet.html">Server-sent events</a> 的指南</li> -</ul> |