Pinned Loading
-
-
-
-
webSocket,HTTP, AJAX轮询,long poll
webSocket,HTTP, AJAX轮询,long poll 1WebSocket是H5所出的一个协议(H5是一系列新的API,或者说是新技术,新规范),基于HTTP,但同HTTP协议基本没什么关系。
2它同HTTP都是浏览器的握手协议组成部分,但是WebSocket是持久化的,HTTP是非持久的,无状态协议。
3实时信息传递的几个方式:
41.Ajax轮询。 不间断地向服务器发送请求,询问服务器是否有新信息。缺点是,需要服务器有足够的处理速度和资源。(速度)
52.long poll。 浏览器向服务器发送请求后,服务器如果没有消息不会立马返回response,而是等到有消息后再返回给浏览器。
-
-
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.