I am using PocketSocket as a LAN WebSocket server (on port 8080) on iOS and I connect to it using javascript.
Here is the javascript code:
var address = 'ws://' + window.location.host + ':8080/ws';
client = new WebSocket( address );
I have tested the connection using the fallowing browsers: Chrome (Windows and OS X), Safari (OS X and iPhone), Opera (Windows), Android Browser, the browser on Panasonic TV.
The only browser that it failed was Firefox (Windows and OS X). I have tried multiple versions of Firefox from version 5 to 40. I have also tried using MozWebSocket, but at no avail.
The error that I get is:
Firefox can't establish a connection to the server at ws://192.168.0.100:8080/ws.
The connection to ws://192.168.0.100:8080/ws was interrupted while the page was loading.
What is different in Firefox from the other browsers? Do you have any suggestions?