title: Why do browsers block some ports?
body: <p>I'm playing around with websockets and it appears, that all browsers with native websocket support I tested with (Safari, Chrome) block some ports. If I try to connect to my server over port 80, everyting works fine. If I try other ports, like 81, 82 or 1000, the connection is prematurely closed because there's nothing on the other end. That's the expected behaviour and it works beautifully.</p>
  
  <p>However, with some ports (such as 20, 37 or 79), the Chrome developer console simply says <code>WebSocket port 79 blocked</code> but my JS code doesn't receive any information about this (not even some sort of timeout). Safari is a little more verbose and comments <code>SECURITY_ERR: DOM Exception 18: An attempt was made to break through the security policy of the user agent.</code></p>
  
  <p>So my questions are these:</p>
  
  <p><strong>How can I reliably detect that a port is blocked?</strong><br/>Do I have to set a timeout and check that manually? That doesn't seem to be the smartest way to go about it, although it might be the only way to do it cross-browser.</p>
  
  <p><strong>Where can I find a list of the blocked ports?</strong><br/>My Google search didn't turn up anything useful, unfortunately.</p>
  
  <p><strong>Why are these ports blocked in the first place?</strong></p>
  
  <p>Thanks in advance!</p>