javascript - 浏览器的实时服务器更新

标签 javascript browser real-time-data

我正在寻找一个框架,它可以从服务器向浏览器提供实时更新,就像它用于网络聊天、谷歌波、谷歌 Buzz、Facebook 等一样。

我找到了 Rocket GWT但最后一次更新是一年多前...

对我来说,最好的实现是在客户端使用 GWT,在服务器上使用 JSON 作为通信协议(protocol)和 C++,但也欢迎任何其他框架,只是为了看看它是否可行:) google 使用的是哪个框架?

最好的问候, 斯蒂芬

最佳答案

看看 websockets,它最终将成为双向客户端-服务器网络通信的标准。

可以在这些表格中查看当前支持:

由于在不久的将来(从 2011 年 8 月起)支持仅在 Safari、Firefox 和 Chrome 中可用,也许一些故障转移库会派上用场:

You want it to work in all browsers, no matter if they have WebSocket support or not? You don't want to rely on proprietary technology such as Flash to provide a fallback And naturally, you don't want to write more than one implementation?

Introducing, the gracefulWebSocket jQuery plugin: Implements the w3c WebSocket interface Wraps the native WebSocket if support is detected Provides a default fallback using traditional AJAX polling over HTTP Requires no extra code on the frontend, allows you to target the WebSocket API today and let users take advantage of it as more browsers add support. Default fallback behavior can be overridden by plugin options

关于javascript - 浏览器的实时服务器更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7024558/

相关文章:

javascript - 一张 Google map 上具有多种颜色的多个多边形

browser - 埃林克斯还是猞猁?

database - 将唯一访问者存储在分布式数据库中

javascript - 为什么输出结果不一样?

javascript - 我的单元测试未显示在测试资源管理器中

javascript - 如何使用phonegap在android中调用asp.net webservice

html - 为什么浏览器控制输入类型文件按钮?

html - 影响缓存的 http header - 教程/文档

Code Composer 和实时数据交换 : problems in Target to Host communication