Reputation: 2124
While trying to follow some tutorials on node I found that If I have two
response.write()
one in
createServer()
method and another in
setTimeout()
function in createServer then I see - The response comes as soon as it is written if I make request using curl on ubuntu and another comes after timeout as expected But if I open in chrome it loads the page only after timeout and I don't see any different chunks in network debugger of chrome. But only one response which is in contrast to the curl usage, Can anyone tell me if I am making this mistake or browsers are implemented this way
Upvotes: 0
Views: 35
Reputation: 23277
It's just a browser's behavior. Browser should render whole page at once to ensure page's continuity.
Upvotes: 1