使用 jQuery 进行连续请求

发布于 2024-09-15 20:22:38 字数 229 浏览 3 评论 0原文

使用 Meebo 后,我注意到他们有一个很好的小系统,可以不断从服务器获取信息。他们有 1 个正在运行的请求,并且在“加载”时持续监视响应。

我想知道是否有办法用 jQuery 来做到这一点。如果没有,有人可以给我一些建议,告诉我从哪里开始用普通的 Javascript 来做这件事吗?

提前致谢

(PS,因为我知道有人会这么说 - 我知道这可能会带来后端问题,并且我相信拥有正确的知识来防止它)

After using Meebo I noticed that they had a nice little system for continually getting information from the server. They have 1 single request running, and they continually monitor the response as it's "loading".

I was wondering if there was a way to do this with jQuery. If not, can someone give me some recommendations on where to start doing this in plain Javascript?

Thanks in advance

(P.S. because I know someone's gonna say it - I'm aware of the backend problems this could introduce and I believe have the correct knowledge to prevent against it)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟若柳尘 2024-09-22 20:22:38

对于 XMPP/BOSH 上的 jQuery,我使用: http://github.com/ssoper/jquery-bosh

Comet 和 BOSH 是填补相同空白的两种技术。

For jQuery over XMPP/BOSH I use: http://github.com/ssoper/jquery-bosh

Comet and BOSH are two technologies that fill the same void.

何止钟意 2024-09-22 20:22:38

查看 Comet 插件,它应该可以帮助您实现这一目标:Comet

Check out the comet plug-in, it should help you accomplish that: Comet

驱逐舰岛风号 2024-09-22 20:22:38

如果您有专用的网络服务器,Comet 会工作得更好。博什也是一样。

查看 Comet 服务器 APE。阅读 http://www.ape-project.org/ajax-push.html
然后选择专门适合您需求的 Comet/BOSH 软件。祝你好运)

Comet will works better if you have dedicated web-server for it. BOSH is the same.

Get a look to Comet-server APE. Read http://www.ape-project.org/ajax-push.html
And after it choose any Comet/BOSH software especially for your needs. Good luck)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文