Gmail是否使用的setInterval()或setTimeout的()做定期刷新? [英] Does Gmail use setInterval() or setTimeOut() to do periodical refresh?

查看:149
本文介绍了Gmail是否使用的setInterval()或setTimeout的()做定期刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我猜他们使用这两个功能,使一个阿贾克斯打电话给他们的服务器,但我不知道。他们是怎么做到的?

I guess they use these two functions to make an Ajax call to their server but I am not sure. How do they do that?

感谢您。

推荐答案

我没有试图反向工程的Gmail,但最有可能他们正在使用某种形式的彗星(反向AJAX)。

I haven't tried to reverse-engineer Gmail, but most likely they are using some form of Comet (reverse AJAX).

通过这种方法信息,请即时没有任何延迟和增加的网络流量。

With this approach information is available instantly without any delay and additional network traffic.

这篇关于Gmail是否使用的setInterval()或setTimeout的()做定期刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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