如何将数据推送到网页客户端? [英] How can you push data to a web page client?

查看:165
本文介绍了如何将数据推送到网页客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚了解了AJAX推送引擎,但它可以运行在Linux / Apache的这不是我的选择。

I just learned about the AJAX Push Engine but it runs on Linux/Apache which is not an option for me.

http://www.ape-project.org/

目前使用AJAX来保持页当前我经常轮询服务器这是不是伟大的高流量的网站。该选项将数据推送到客户端只在必要时就是一个很好的选择,但本地JavaScript不支持插座,AFAIK。一招我了解,但该网站现在已经走了,是使用闪存模块来处理套接字通信和中继信息为JavaScript。

Currently with AJAX to keep a page current I have to poll the server frequently which is not great for a high traffic site. The option to push data to the client only when necessary is a great option, but natively JavaScript does not support sockets, AFAIK. One trick I read about, but the site is now gone, is to use a Flash module to handle socket communications and relay message to JavaScript.

通过研究这个方法的问题是,JavaScript的推动为关键词拿出推送功能的阵列,而不是我想要的环境。

The trouble with researching this approach is that "JavaScript push" as keywords come up with the push function for arrays instead of the context I want.

如何才能建立与服务器的持久连接在浏览器中做俯卧撑通信?我需要的Flash / ActionScript中还是有,将工作与所有的当前活动的浏览器另一种选择? (IE6 / 7/8,FF3,Safari浏览器,Chrome浏览器)

How could establish a persistent connection with the server to do push communications in the browser? Do I need Flash/ActionScript or is there another option that would work with all of the currently active browsers? (IE6/7/8, FF3, Safari, Chrome)

当谈到服务器我还需要解决由于原产地政策,以及港口安全的并发症。我AP preciate任何你可以指出,将解释可用的选项。

When it comes to the server I also need to work out the complications due to Origin policy as well as port security. I appreciate anything you can point out that will explain the available options.

推荐答案

你想要的是的 COMET ,否则我也仰望长投票

What you want is COMET, or I would also look up long polling.

<一个href="http://stackoverflow.com/questions/944644/how-to-display-html-to-the-browser-incrementally-over-a-long-period-of-time">I问过类似的问题。

这篇关于如何将数据推送到网页客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆