title: Socket.io and modern browsers aren't working
body: <p>I'm having some weird issues with socket.io and modern browsers. Surprisingly, with IE9 works fine because fallbacks to flashsocket which appears to work better.</p>
  
  <p>In my server (with express)</p>
  
  <pre><code>var io = socketio.listen(server.listen(8080));
  io.configure('production', function(){
      console.log("Server in production mode");
      io.enable('browser client minification');  // send minified client
      io.enable('browser client etag');          // apply etag caching logic based on version number
      io.enable('browser client gzip');          // gzip the file
      io.set('log level', 1);                    // reduce logging
      io.set('transports', [                     // enable all transports (optional if you want flashsocket)
          'websocket'
          , 'flashsocket'
          , 'htmlfile'
          , 'xhr-polling'
          , 'jsonp-polling'
      ]);
  });
  </code></pre>
  
  <p>On the browser I can see in the Network tab (on Chrome) that a websocket is stablished and get in <code>101 Switching Protocols</code> in Pending mode. After that, appears xhr-polling and jsonp-polling (what happend to flashsocket ? )</p>
  
  <p>The worst part is that info don't go back and forth. I have this on connection:</p>
  
  <pre><code>io.sockets.on('connection', function (socket) {
      // If someone new comes, it will notified of the current status of the application
      console.log('Someone connected');
      app.sendCurrentStatus(socket.id);
      io.sockets.emit('currentStatus', {'connected': true);
  });
  </code></pre>
  
  <p>And on client:</p>
  
  <pre><code>socket.on('currentStatus', function (data){ console.log(data) });
  </code></pre>
  
  <p>However I only be able to see that log <em>when I turn off the server</em> which is launched with:</p>
  
  <pre><code>NODE_ENV=production node server.js
  </code></pre>
  
  <p>What am I doing wrong?</p>