且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Node Js的response.write问题

更新时间:2023-12-05 22:36:34

我似乎是浏览器特有的行为-Firefox会立即显示数据("Hello:"),而chrome似乎会缓冲并等待响应结束.请注意,如果您一开始写入更多数据(例如,我写了1000个"Hello"),chrome也会立即显示数据.

I seems to be browser specific behavior -- firefox shows the data ("Hello:") immediately while chrome seems to buffer and wait until the response is ended. Note that chrome also shows the data immediately if you write more data at first (e.g. I wrote 1000 "Hello"s).