Socket.io Node.js Error in IE7 - Access Denied

I am using socket.io to connect to my node server using the following script:

$socket = new io.Socket(null,{port:8086,rememberTransport:false}); $socket.connect(); 

If works fine in IE8 / 9, Chrome, Safari and FF.

When I try to do this in IE7, the connection is established, but then the following message appears:

 An error has occured in the script on this page. Error: Access denied. 

Then the client disconnects from the node server.

I am running node.js V0.4.1.

Does anyone have any ideas?

Thanks.

+4
source share
1 answer

This was because io.connect did not have a secure:true state. It should read:

  var socket = new io.Socket(null, {port: 443, secure: true, rememberTransport: false}); socket.connect(); 
+2
source

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


All Articles