[英]How can I establish a long-lived connection with jQuery for push notification?
I am trying to establish a long lived connection using jQuery. 我正在尝试使用jQuery建立长期连接。 I have a URL in the form of:
我有以下形式的URL:
http://www.sample.com/Notify?sessionId=xxxxxx
Now if I call this URL with the sessionId, it is equivalent to registering for Asynchronous notifications. 现在,如果我使用sessionId调用此URL,则等效于注册异步通知。 I am aware of ajax calls using jQuery but as I understand it, after getting some data, jQuery terminates the connection.
我知道使用jQuery进行ajax调用,但是据我了解,在获取一些数据后,jQuery终止了连接。 Is there a way to make it retain the connection so that the server miht be able to push information?
有没有办法使它保留连接,以便服务器可以推送信息?
看看这个帖子-带jQuery的Bayeux / Comet
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.