What is the advantage to use chunked encoding?

前端 未结 2 2036
忘掉有多难
忘掉有多难 2021-01-13 10:54

In html, I know there is a chunked encoding. Anyone knows its advantage?

2条回答
  •  情深已故
    2021-01-13 11:22

    It's not part of HTML - it's part of HTTP.

    It means that you can start writing the content to the output stream before you know exactly how large the output is going to be. This means you don't have to buffer the whole page (or whatever you're delivering) in memory or on disk before you start transmitting.

提交回复
热议问题