title: socket.io connection via client not working
body: <p>I have just started using node.js socket.io. I am working on a simple connection between client and server.</p>
  
  <p>Here is my server code:</p>
  
  <pre><code>var express = require('express');
  var routes = require('./routes');
  var http = require('http');
  var path = require('path');
  var socketio = require('socket.io');
  
  var app = express();
  
  app.set('port', process.env.PORT || 1337);
  app.set('views', path.join(__dirname, 'views'));
  app.set('view engine', 'jade');
  app.use(express.logger('dev'));
  app.use(express.json());
  app.use(express.urlencoded());
  app.use(express.methodOverride());
  app.use(app.router);
  app.use(express.static(path.join(__dirname, 'public')));
  
  app.get('/', routes.index);
  
  var server = app.listen(app.get('port'), function(){
    console.log("Express server listening on port " + app.get('port'));
  });
  var io = socketio.listen(server);
  </code></pre>
  
  <p>and this is the client code(<a href="http://smartican.com/nodetest.html" rel="nofollow">http://smartican.com/nodetest.html</a>):</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="socket.io.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  var socket;
  socket = io.connect("http://smartican.com:1337/");
  $(function() {
   alert(socket.transport.sessionid);  
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>there seems to be a problem when connecting to the socket from client as line<br></p>
  
  <pre><code>socket = io.connect("http://smartican.com:1337/");
  </code></pre>
  
  <p>breaks the script.. I have tested and the socket is open</p>