I am trying to setup an app working with SockJS over STOMP. However, it seems that the connection is not established. I do not have these issues with running all on Chrome, FF and so on.
我正在嘗試建立一個應用程序與SockJS一起工作而不是跺腳。然而,這種聯系似乎還沒有建立起來。我沒有在Chrome、FF等上運行所有這些問題。
Is there a way to support this for IE9? Or is it impossible to run websockets with sockjs on IE9? I saw some discussions where people were solving some issues with IE9 and sockjs but none providing a solution to my issue.
有辦法支持IE9嗎?或者在IE9上使用sockjs來運行websockets是不可能的嗎?我看到一些討論,人們正在解決IE9和sockjs的一些問題,但沒有一個能解決我的問題。
BR
BR
1
The issue is resolved. SockJS emulates websockets on IE9 with no issue. The only thing that I had to do was to provide absolute path for creating the SockJS object.
這個問題得到解決。SockJS在IE9上模擬websockets,沒有任何問題。我唯一要做的就是提供創建SockJS對象的絕對路徑。
Before:
之前:
var webSocket = new SockJS('topic/publish');
After:
后:
var webSocket = new SockJS('http://localhost:8080/topic/publish');
Although it was working with Chrome and Firefox, there were issues to run it on IE9 that doesn't support websockets (out of the box).
雖然它在Chrome和Firefox上運行,但是在IE9上運行它並不支持websockets(開箱即用)。
0
Internet Explorer 9 does not support websockets http://caniuse.com/websockets.
Internet Explorer 9不支持websockets http://caniuse.com/websockets。
You can use a polyfill based on Flash like https://github.com/gimite/web-socket-js
您可以使用基於Flash的polyfill,比如https://github.com/gimite/websocket -js
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2014/07/02/22d2fd2425c58ca7e2f4847b56161a6.html。