服务器端使用reserved (local)状态的流向客户端发送HEADERS帧。该HEADERS帧就是服务器端推送(Server Push)中被推送的响应的头部。当发送了HEADERS帧之后,服务器端将视该流的状态为half closed (remote)。
基于1个网页-相关网页
长时间轮询:也就是所谓的异步轮询,这种方式是纯服务器端推送方式和客户端拉取方式的混合。
Long Polling: Also known as Asynchronous Polling, this method is a hybrid of pure server push and client pull.
Facebook聊天功能提供了关于AJAX一个有意思的问题案例:把数据从服务器端推送到客户端。
Facebook chat provides an example of an interesting problem with AJAX: pushing data from server to client.
另一种通信形式就是消息,这样应用就可以推送来自于服务器端的消息并进行近乎实时的通信。
The other type of communication is messaging. This can be used to create applications that push messages from the server and perform near real time communication.
应用推荐