use socket.io on other port

I'm trying to make chat based on NodeJS and Socket.IO All the work is good when I run it on the same port 4040

but when I put the source code of socket.io on other port it doesnt work on ie6 and on ie7 & 8 I see the page refreshed every time when get new data

shortly, I have a website based on PHP port 80, I made chat based on nodeJs port 4040

website work fine and the chat also work fine on port 4040

this is the source of socket.io

work fine on port 4040 :

<script src="/socket.io/socket.io.js"></script>

work but with problemes on ie 6 7 8

<script src="http://mywebsite.com:4040/socket.io/socket.io.js"></script>

please don't downgrade my question because I know many of you don't understand 100% my question

You shouldn't change the port that way, here is the best way to change the port.

<script src="/socket.io/socket.io.js"></script>
<script>
  var socket = io.connect('http://localhost:4040');
</script>

Here we call the JS file relative to your application, and specify the port in the initialization of the socket.