5

I don't know why but I am still getting this error on my website (hosted on nodejitsu.com). If am I testing project on localhost everything goes well, but if I open it in browser this error is showing..

I was searching for this issue, but I didn't find anything usefull..

dontHaveName
  • 1,899
  • 5
  • 30
  • 54
  • 1
    answered here http://stackoverflow.com/questions/14140414/websocket-interrupted-while-page-is-loading-on-firefox-for-socket-io – Validus Oculus Oct 31 '14 at 15:43

1 Answers1

0

This does the trick:

$(window).on('beforeunload', function(){
    socket.close();
});
ByteHamster
  • 4,884
  • 9
  • 38
  • 53
Kev C
  • 61
  • 1
  • 6