top | item 9632940

(no title)

shorbaji | 10 years ago

> If you use WebSockets for "realtime push", then HTTP/2's server push feature could potentially be used as an alternative.

One thing to keep in mind with HTTP/2 server push is that a server can only send a push in response to a client request. So this isn't a drop-in "real-time push" mechanism. To implement the equivalent of real-time push would likely require client/server to keep a stream within the connection in the "open" state whereby the server can send continue to send data frames on that.

discuss

order

bonobo|10 years ago

    One thing to keep in mind with HTTP/2 server push is that a server can only
    send a push in response to a client request.
This was the difference that I was not aware of, thanks. So HTTP/2 server push is just opportunistic, while WebSockets are real-time push with a persistent connection.