Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are more differences than the ones you have identified.</p> <p>Duplex/directional:</p> <ul> <li>Uni-directional: HTTP poll, long poll, streaming.</li> <li>Bi-direcitonal: WebSockets, plugin networking</li> </ul> <p>In order of increasing latency (approximate):</p> <ul> <li>WebSockets</li> <li>Plugin networking</li> <li>HTTP streaming</li> <li>HTTP long-poll</li> <li>HTTP polling</li> </ul> <p>CORS (cross-origin support):</p> <ul> <li>WebSockets: yes</li> <li>Plugin networking: Flash via policy request (not sure about others)</li> <li>HTTP * (some recent support)</li> </ul> <p>Native binary data (typed arrays, blobs):</p> <ul> <li>WebSockets: yes</li> <li>Plugin networking: not with Flash (requires URL encoding across ExternalInterface)</li> <li>HTTP *: recent proposal to enable binary type support</li> </ul> <p>Bandwidth in decreasing efficiency:</p> <ul> <li>Plugin networking: Flash sockets are raw except for initial policy request</li> <li>WebSockets: connection setup handshake and a few bytes per frame</li> <li>HTTP streaming (re-use of server connection)</li> <li>HTTP long-poll: connection for every message</li> <li>HTTP poll: connection for every message + no data messages</li> </ul> <p>Mobile device support:</p> <ul> <li>WebSocket: iOS 4.2 and up. Some Android via Flash emulation or using <a href="https://play.google.com/store/apps/details?id=org.mozilla.firefox&amp;hl=en" rel="noreferrer">Firefox for Android</a> or <a href="https://play.google.com/store/apps/details?id=com.android.chrome&amp;feature=search_result#?t=W251bGwsMSwyLDEsImNvbS5hbmRyb2lkLmNocm9tZSJd" rel="noreferrer">Google Chrome for Android</a> which both provide native WebSocket support.</li> <li>Plugin networking: some Android. Not on iOS</li> <li>HTTP *: mostly yes</li> </ul> <p>Javascript usage complexity (from simplest to most complicated). Admittedly complexity measures are somewhat subjective.</p> <ul> <li>WebSockets</li> <li>HTTP poll</li> <li>Plugin networking</li> <li>HTTP long poll, streaming</li> </ul> <p>Also note that there is a W3C proposal for standardizing HTTP streaming called <a href="http://www.w3.org/TR/eventsource/" rel="noreferrer">Server-Sent Events</a>. It is currently fairly early in it's evolution and is designed to provide a standard Javascript API with comparable simplicity to WebSockets.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload