Mobile app version of vmapp.org
Login or Join
Gretchen104

: How to avoid "chunked" Transfer-Encoding? How to avoid chunked Transfer-Encoding ? Is there any benefit with this encoding? Below is what appears as part of Apache Web Server (V2.4) header message:

@Gretchen104

Posted in: #Apache

How to avoid chunked Transfer-Encoding ? Is there any benefit with this encoding?

Below is what appears as part of Apache Web Server (V2.4) header message:

Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Transfer-Encoding: chunked

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

Chunked transfer encoding is an HTTP/1.1 feature that enables keep-alive requests.

If you want to avoid chunked encoding send requsets to the server using HTTP/1.0. A request with HTTP/1.0 would look like this

GET /index.html HTTP/1.0
Host: example.com

The problem with HTTP/1.0 is that it required a new connection for each resource downloaded. Since each html document contains many images, css, and js files, you might need tens of connection to download an entire page using HTTP/1.0. Establishing each connection is slow. When HTTP/1.1 was invented, a design goal was to allow pipelining and re-use of connections. Now browsers can download the page and all of its images in a single connection. The webserver responds in "chunks". Each chunk starts with the size of the chunk. Once that size has been downloaded, the browser can make another request on the same connection and receive more chunked data without starting up a new connection.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme