简单来说,如何通过ajax实现推送?这是通过用于传统ajax请求的相同对象完成的吗?
解决方法
In simple terms,how is push achieved through ajax?
一般的想法是始终向服务器“挂起”请求,因此服务器可以在想要向客户端“推送”某些内容时对其进行响应.
Is this done through the same object used for conventional ajax requests?
它可以,但您也可以使用iframe模拟它.这个领域目前正处于非常活跃的发展阶段,因此这里也可能会提到WebSockets和EventSource.