title: node.js and setTimeout and google chrome
body: <p>I am a beginner in node.js I have some problems with <code>setTimeout(function(){.....},time);</code> thingo. This works fine when i curl the local server but not as expected in google chrome (i haven't tested other browsers)</p>
  
  <p>My Code is:</p>
  
  <pre><code>/* simple node.js createserver */
  
  var http = require('http');
  
  http.createServer(function (request, response) {
       response.writeHead(200);
    response.write('Somthing\r\n');
  
    setTimeout(function(){
          response.end('\n This came out after 5 seconds :) ');
    }, 5000);
     response.write('Hello World\n');
  }).listen(8124);
  
  
  
  console.log('Server running at http://127.0.0.1:8124/');
  </code></pre>
  
  <p>When i <code>curl 127.0.0.1:8124</code>  everything works as expected. But when i point that in browser, it remains idle for some time (which i guess is that 5 seconds) and shows all the contents at once? Is this the expected behavior of node.js or i am missing something? Can the browser do thing like the curl does (i.e, printing two lines first, and waiting for 5 seconds and printing another line)?</p>