mozilla

Revision 352695 of Server-sent events

  • リビジョンの URL スラグ: Server-sent_events
  • リビジョンのタイトル: Server-sent events
  • リビジョンの ID: 352695
  • 作成日:
  • 作成者: ethertank
  • 現行リビジョン いいえ
  • コメント

このリビジョンの内容

Traditionally, a web page has to send a request to the server to receive new data; that is, the page requests data from the server. With server-sent events, it's possible for a server to send new data to a web page at any time, by pushing messages to the web page. These incoming messages can be treated as Events + data inside the web page.

Documentation

Using server-sent events
A tutorial guide to writing both server and client side part of a server-sent events app.
EventSource reference
A reference to the client-side EventSource API.

View All...

Tools

AJAXJavaScript, WebSockets

関連情報

仕様

ブラウザ実装状況

{{CompatibilityTable}}
機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari
EventSource support 9 {{CompatGeckoDesktop("6.0")}} {{CompatUnknown}} 11 5
機能 Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
EventSource support {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

このリビジョンのソースコード

<p>Traditionally, a web page has to send a request to the server to receive new data; that is, the page requests data from the server. With server-sent events, it's possible for a server to send new data to a web page at any time, by pushing messages to the web page. These incoming messages can be treated as <em><a href="/ja/docs/DOM/event" title="DOM/Event">Events</a> + data</em> inside the web page.</p>
<table class="topicpage-table">
  <tbody>
    <tr>
      <td>
        <h2 id="Documentation" name="Documentation" class="Documentation">Documentation</h2>
        <dl>
          <dt><a href="/ja/docs/Server-sent_events/Using_server-sent_events" title="Server-sent events/Using server-sent events">Using server-sent events</a></dt>
          <dd>A tutorial guide to writing both server and client side part of a server-sent events app.</dd>
          <dt><a href="/ja/docs/Server-sent_events/EventSource" title="Server-sent events/EventSource">EventSource reference</a></dt>
          <dd>A reference to the client-side EventSource API.</dd>
        </dl>
        <p><span class="alllinks"><a href="/ja/docs/tag/Server-sent_events" title="tag/Server-sent events">View All...</a></span></p>
      </td>
      <td>
        <h2 id="Tools" name="Tools" class="Tools">Tools</h2>
        <ul>
          <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>
        </ul>
        <h2 id="Related_Topics" name="Related_Topics" class="Related_Topics">Related Topics</h2>
        <dl>
          <dd><a href="/ja/docs/AJAX" title="AJAX">AJAX</a>,&nbsp;<a href="/ja/docs/JavaScript" title="JavaScript">JavaScript</a>, <a href="/ja/docs/WebSockets" title="WebSockets">WebSockets</a></dd>
        </dl>
      </td>
    </tr>
  </tbody>
</table>

<h2 id="See_also" name="See_also">関連情報</h2>
<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>

<h2 id="Specification" name="Specification">仕様</h2>
<ul>
  <li><a href="http://dev.w3.org/html5/eventsource/" title="http://dev.w3.org/html5/eventsource/">Server-sent events</a></li>
</ul>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザ実装状況</h2>
<div>{{CompatibilityTable}}</div>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>機能</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>EventSource support</td>
        <td>9</td>
        <td>{{CompatGeckoDesktop("6.0")}}</td>
        <td>{{CompatUnknown}}</td>
        <td>11</td>
        <td>5</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>機能</th>
        <th>Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>EventSource support</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
        <td>{{CompatUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
このリビジョンへ戻す