Possible to do client-side HTTP push?

Pretty much the opposite of server-side push, also known as [Comet][1]. I'm wondering if it is possible to use long lived HTTP connections to push information to the server. Unlike a simple XHR, the connection would be kept alive and data would be streamed to the server at intervals, as the user completes actions etc. Using standard technologies I don't believe this is possible, but I'm open to suggestions on possible exploitations or ingenious ways of accomplishing this. The purpose would be to complete low-latency data pushes to the server for fast and efficient one-directional streaming. I'm not interested in using socket implementations with flash/java bridges because of the hassle of serving cross domain policies or getting the java signed. Crude hacks that work without additional dependencies are welcome. Preferably the solution would be done with javascript. [1]: http://en.wikipedia.org/wiki/Comet_(programming)
There's not much of a reason for this. Since HTTP1.1 reuses connections, once the first connection has been established, subsequent connections are incredibly fast; standard AJAX techniques solve this without any sort of issues related to maintaining long lived connections on the server, handling connection failures, etc.

以上就是Possible to do client-side HTTP push?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准