title: Issues with Socket.IO with Chrome and Firefox
body: <p><strong>Another update:</strong></p>
  
  <p>The problem occurs when running on localhost as well. Since I figured out the problem comes from the proxy server, here's its code : </p>
  
  <pre><code>var serverBouncer = bouncy(function(req, res, bounce) {
      var path = req.url;
      var url = req.headers.host;
      if (typeof url !== "string")
          return;
      var urlArray = url.split('.');
      var bouncePort = port;
      if (!isNaN(urlArray[0]))
          bouncePort = parseInt(urlArray[0]);
      else if (String(urlArray[0]).toLowerCase() === "www" &amp;&amp; !isNaN(urlArray[1]))
          bouncePort = parseInt(urlArray[1]);
      bounce(bouncePort);
  });
  serverBouncer.listen(80);
  </code></pre>
  
  <hr>
  
  <p><strong>Update:</strong> </p>
  
  <p>I found where the problem came from!!! But I still need to find the solution... There seems to be issues with using newer versions of Socket.io (>= 1.0) with a proxy server (bouncy, in my case).</p>
  
  <hr>
  
  <p>I recently updated Socket.IO from v0.9.16 to v1.4.5, as well as adding Express to the mix. However, now I cannot open multiple (number seems to vary) tabs in Chrome and Firefox without experiencing strange issues (Edge is the only one to work well). It either hangs, or partially loads html and other resources before it hangs. </p>
  
  <p>After waiting, I often get the error :
      Failed to load resource: the server responded with a status of 400 (Bad Request)</p>
  
  <p>When I close one of the tab that's been hanging, it unblocks the other tabs that were also hanging.</p>
  
  <p>The issues were not present before going through with the changes listed above.</p>
  
  <p>I've been doing research for 2 full days and just now decided to post this, as I know it's very vague and I'm probably not providing enough information. As much as I'd like to, it would take a very long time to remember and list everything I tried during that time.</p>
  
  <p>Using Windows 10 with Chrome v51.0.2704.103, Firefox v43.0.1. The server (CentOS) is using node v6.2.2 with <em>mainly</em> the following modules : </p>
  
  <ul>
  <li>express@4.14.0</li>
  <li>npm@3.9.5</li>
  <li>socket.io@1.4.5</li>
  </ul>
  
  <p>Here's some relevant server code : </p>
  
  <pre><code>var port = 8502;    
  var socketio = require('socket.io');
  var express = require("express");
  var http = require('http');
  var app = express();
  var server = http.createServer(app);
  var io = socketio.listen(server);
  
  server.listen(port);
  
  app.get('/', function(req, res, next) {
    //Returning index.html
  });
  
  io.on("connection", function(socket) {
      //Some events...
  });
  </code></pre>
  
  <p>Here's a bit of the client code :</p>
  
  <pre><code>var client = io.connect();
  
  client.on('connect', function() {
    //Some events
  })
  </code></pre>