有什么方法可以将数据从 Web 服务器推送到浏览器? [英] Is there some way to PUSH data from web server to browser?

查看:30
本文介绍了有什么方法可以将数据从 Web 服务器推送到浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ajax我当然知道,但是Ajax的问题​​是浏览器要经常轮询服务器,看是否有新数据.这会增加服务器负载.

Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load.

除了频繁轮询服务器之外,还有什么更好的方法(即使使用 Ajax)?

Is there any better method (even using Ajax) other than polling the server frequently?

推荐答案

是的,您正在寻找的是 COMET http://en.wikipedia.org/wiki/Comet_(programming).其他适合搜索的 Google 术语包括 AJAX-push 和 reverse-ajax.

Yes, what you're looking for is COMET http://en.wikipedia.org/wiki/Comet_(programming). Other good Google terms to search for are AJAX-push and reverse-ajax.

这篇关于有什么方法可以将数据从 Web 服务器推送到浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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