“websocket was interrupted while page is loading” on Firefox for Socket.io

前端 未结 6 1838
不知归路
不知归路 2020-12-07 13:19
Error: The connection to  was interrupted while the page was loading.
Source File: localhost/socket.io/node_modules/socket.io-client/dist/socket.io.         


        
6条回答
  •  鱼传尺愫
    2020-12-07 14:09

    This seems to be an open bug in Firefox (as of 2015-03-29):

    https://bugzilla.mozilla.org/show_bug.cgi?id=712329

    The workaround (for now) is to call close() on the websocket on beforeunload, as Alexander pointed out.

    Update 2016-04: According to Bugzilla, this will be fixed in Firefox 48

提交回复
热议问题