我们正在将Atmosphere整合到我们当前的应用程序中。在IE 11和最新版Chrome中,一切都很棒。但是,在IE 10中,在客户端向服务器发出AJAX调用之后,我们无法接收推送通知。
我们打开了Atmosphere调试,这是IE 10中的日志。
调用executeWebSocket
使用URL:ws://t1c.lh.com:8080 / wicket / page?12-IResourceListener.9-& X-Atmosphere-tracking-id = 0& X-Atmosphere-Framework = 2.0.8- jQuery和安培; X .....
Websocket成功开通
调用1个全局回调:打开
....做一个已经存在的AJAX请求.....
调用1个全局回调:取消订阅
Websocket正常关闭
取消订阅后,客户端不再接收服务器推送事件。 IE 11中不会发生此取消订阅呼叫.IE 11收到推送通知而没有问题。
关于如何修复的任何想法?
这是我们的氛围设置。使用Tomcat 8.0.23。
<servlet>
<description>Atmospherefilter</description>
<servlet-name>Atmospherefilter</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>AppClassHere</param-value>
</init-param>
<init-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.sessionSupport</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.websocket.maxIdleTime</param-name>
<param-value>60000</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useWebSocketAndServlet3</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.asyncSupport</param-name>
<param-value>org.atmosphere.container.JSR356AsyncSupport</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcastFactory</param-name>
<param-value>org.atmosphere.cpr.DefaultBroadcasterFactory</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
<param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value>
</init-param>
<init-param>
<param-name>filterMappingUrlPattern</param-name>
<param-value>/*</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.websocket.WebSocketProtocol</param-name>
<param-value>org.atmosphere.websocket.protocol.EchoProtocol</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcastFilterClasses</param-name>
<param-value>org.apache.wicket.atmosphere.TrackMessageSizeFilter</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Atmospherefilter</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
谢谢, 马特
答案 0 :(得分:1)
我已经弄清楚了。如果使用href =“javascript:void(0);”单击链接,IE 10将卸载该页面。我们所有的链接都有这个(以及AJAX调用的onclick属性),导致onbeforeunload运行,其中包含大气取消订阅代码。
我已经验证删除href解决了这个问题。当href =“javascript:void(0);”时,新版本的IE和Chrome不会卸载页面存在。
感谢您的跟进!
答案 1 :(得分:0)
您是否可以分享重现问题的端到端测试用例?但首先,请确保您尝试使用更新版本的javascript客户端:
https://github.com/Atmosphere/atmosphere-javascript
只需将测试用例发送到邮件列表
即可https://groups.google.com/group/atmosphere-framework?pli=1
- Jeanfrancois(Atmosphere的领导)