javascript - Ajax简单问题

标签 javascript ajax streaming push

我有一个关于 ajax 的非常简单的问题。 如果我想刷新我网站的特定区域,我认为 ajax 是最好的方法。

但是有没有 javascript 定期检查服务器上的更改,服务器会在给定事件发生时发送数据?

我想要的是客户端不需要定期发送请求,而是服务器只会将信息发送给客户端,而客户端又会有某种事件监听器。

提前致谢

最佳答案

是的,这是可以做到的。它被称为“推送”或“推送流”。

这是一个提供执行此功能的网站:InstantPush .以及来自他们主页的简短引述:

"InstantPush is used to make web pages and mobile phones go live. They will instantly be updated in real time when a change occurs at the server side. Standard web communication makes updates pass firewalls and proxies. Without any modules at the client side!

InstantPush has been used since 2001, before "Ajax was invented". It is probably the First Ajax Push Framework.

InstantPush is leading the market in northern Europe."

这是提供此技术的另一家公司:LightStreamer .以及他们主页上的引述:

"Lightstreamer is a scalable and reliable Server for pushing live data to Rich Internet Applications

Based on the Comet and Real-Time Web paradigms, it streams real-time data to any Web browser and client application. HTML, HTML5, AJAX, Flex, Silverlight, Java, .NET, iOS, Android, and BlackBerry applications, can easily receive live data from Lightstreamer Server.

Lightstreamer has been used in many mission-critical production systems, where scalability, low network impact, bandwidth management, adaptive streaming, and other advanced features, have proven fundamental."

关于javascript - Ajax简单问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4450537/

相关文章:

javascript - 如何使用javascript获取页面中图像的RGB值?

javascript - 仅使用 JavaScript 中的 Parse 验证密码

Javascript将数组拆分为多个数组

javascript - $digest 已经在进行中 - AngularJS 中的指令

javascript - 无法使用 AJAX 下载 TCPDF 生成的 PDF

c# - .NET 视频音频聊天

在使用 MediaPlayer 的 MEDIA_INFO_BUFFERING_START 之后,Android 直播永远不会开始

javascript - 如何在 vue javascript 中引用静态资源

php - JSON 预览在 Chrome 开发工具中不起作用

iphone - 将音频剪辑从 iPhone 流式传输到服务器