If I attempt to create an EventSource connection to anything other than port 80 I get a security exception. For example: new EventSource('http://192.168.1.11:65411/'); > 11550SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent However, if I try to open a WebSocket on that same port, it works absolutely fine. Additionally, Firefox allows non-port 80 EventSources. Perhaps there is a reason why only port 80 is allowed for EventSource, but it seems odd that WebSocket is allowed, while EventSource is not.
It's a known limitation, WebKit only supports same origin requests with EventSource. *** This bug has been marked as a duplicate of bug 61862 ***