We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第363天 使用ajax轮询接口有什么优缺点?
#37
我也要出题
The text was updated successfully, but these errors were encountered:
首先,所谓轮询接口的原理是 利用 setTimeout 定时请求API接口
优点: 1,可以简单不用二次 开发websocket 实现所需功能 几乎没有学习成本 2,使用简单 缺点: 1,性能相对 socket 来说 相对差,利用 setTimeout 定时请求接口 占用内存性能 定时任务,又可能请求超时导致内存溢出 2,请求返回数据不稳定,请求失败断连 重连机制
Sorry, something went wrong.
@makejun168 应该是setInterval轮询吧
轮询的优点是:简单; 缺点是:响应不及时、网络流量消耗大。
No branches or pull requests
第363天 使用ajax轮询接口有什么优缺点?
#37
我也要出题
The text was updated successfully, but these errors were encountered: