Does anyone managed to get it work in Chrome?

It works with curl, but it doesn't work with Chrome.

On Sunday, 18 July 2010 19:46:02 UTC+5, Eric Fong wrote:
>
> Hi 
>
> I have a stupid question. I have following code and hoping the data 
> chunks render one by one. 
> But my chrome wait 3 second and render everything all in one. Anyway 
> to make it works? 
>
> var http = require('http'); 
> http.createServer(function (request, response) { 
>   response.writeHead(200, { 
>           'Content-Type': 'text/plain', 
>       'Transfer-Encoding': 'chunked' 
>   }); 
>   setTimeout(function(){ 
>           response.write('25\n'); 
>           response.write('This is the data in the first chunk\n\n'); 
>   }, 1000); 
>   setTimeout(function(){ 
>           response.write('1C\n'); 
>           response.write('and this is the second one\n\n'); 
>   }, 2000); 
>   setTimeout(function(){ 
>           response.end('0'); 
>   }, 3000); 
> }).listen(8124); 
> console.log('Server running at http://127.0.0.1:8124/'); 
>
> Thanks

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/5bf23582-a482-48b3-af11-2d2fc08b4bba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to