This post is the best explanation discussing the difference / advantages of / etc, about Long Polling, Comet, SSE and WebSockets.
For the most part, the client usually needs to make the first request to the server to establish a connection. After the connection is established, the server can transmit data to the client. Thus, even with WebSockets, the client will fulfill an initial request to the server to establish a reliable connection between them.
- HTTP- GET . . , . , HTTP-, , 15 -. - -, . . , ajax , . - , . (.. ) , Node.js, Ajax . Server-Sent Events EventSource. , / /, . , . - GET, Content-Type "text/event-stream" HTTP- .
, Server-Sent. HTTP GET-, , , 90% , .
SSE/Comet , . , , , . HTTP- , . SSE, HTTP- , - , / HTTP-. GET. ajax, SSE / EventSource.
: SSE .