Hence, this technique is often referred to as a "Hanging GET".
When information becomes available, the server responds, closes the connection, and the process is repeated.
When communicating using s have been kept in the shadow is because later APIs like Web Sockets provide a richer protocol to perform bi-directional, full-duplex communication.
Having a two-way channel is more attractive for things like games, messaging apps, and for cases where you need near real-time updates in both directions.
However, in some scenarios data doesn't need to be sent from the client. A few examples would be friends' status updates, stock tickers, news feeds, or other automated data push mechanisms (e.g.
" Many people have never heard of them, and rightfully so.
Over the years, the specification has seen significant changes, and the API has taken somewhat of a backseat to newer, sexier communication protocols such as the Web Socket API.