如何避免AJAX刷新?
我有一个用 CGI(c++) 编写的客户端和服务器,因为 JS 模型就像向服务器询问一些东西,服务器没有发送异步消息的机制。那么这意味着客户端需要定期轮询服务器?
我读过BOSH协议,它说要实现http的异步,一个网页可以发出多个HTTP请求,但服务器将保持直到客户端有任何异步事件。但我不知道如果没有数据,服务器可以保持连接多长时间。
如何解决这个问题,我想应该已经解决好了:)
Bin
I have a client and a server written in CGI(c++), as JS model is like to ask something from server, there is no mechanism for server to send async message. So this means the client needs to poll server periodically?
I read BOSH protocol, it says to achieve the async for http, a web page can issue several HTTP request, but the server will hold until it has any async events to the client. But I don't know how long the server can hold the connection if there is no data.
How to resolve this problem, i think it should be resolved well already :)
Bin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论