SockJS does not work on IE9 (Websockets)

I am trying to configure an application that works with SockJS on top of STOMP. However, the connection does not seem to be established. I don't have these problems when running everything on Chrome, FF, etc.

Is there any way to support this for IE9? Or is it impossible to start websockets with sockjs on IE9? I saw some discussions in which people solved some problems with IE9 and sockjs, but none of them helped me in solving my problem.

BR

+4
source share
2 answers

The problem is resolved. SockJS emulates websockets on IE9 without problems. The only thing I had to do was provide an absolute path to create the SockJS object.

Before:

var webSocket = new SockJS('topic/publish');

After:

var webSocket = new SockJS('http://localhost:8080/topic/publish');

, Chrome Firefox, IE9, - ( ).

+1

Internet Explorer 9 websockets http://caniuse.com/websockets.

polyfill Flash, https://github.com/gimite/web-socket-js

0

Source: https://habr.com/ru/post/1546798/


All Articles