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,857
  • 5
  • 28
  • 50
  • 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

1

This does the trick:

$(window).on('beforeunload', function(){
    socket.close();
});
ByteHamster
  • 4,764
  • 9
  • 37
  • 51
Kev C
  • 63
  • 1
  • 6