夏天的雨 发表于 2017-2-8 18:25:32

WebSocket 和SSE,XHR的联系与区别



XHR is optimized for "transactional" request-response communication: the client sends the full, well-formed HTTP request to the server, and the server responds with a full response. There is no support for request streaming, and until the Streams API is available, no reliable cross-browser response streaming API.
SSE enables efficient, low-latency server-to-client streaming of text-based data: the client initiates the SSE connection, and the server uses the event source protocol to stream updates to the client. The client can’t send any data to the server after the initial handshake.

页: [1]
查看完整版本: WebSocket 和SSE,XHR的联系与区别