使用 jQuery 进行连续请求
使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于 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.
查看 Comet 插件,它应该可以帮助您实现这一目标:Comet
Check out the comet plug-in, it should help you accomplish that: Comet
如果您有专用的网络服务器,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)