The HTTP Transfer-Encoding is a response-type header that performs as the hop-by-hop header, the hop-by-hop header connection is the single transport-level connection must not be re-transmitted. This header is performing between two nodes (single transport-level connection). If there is multi-node connection then have to use other
Supported Browsers: The browsers are compatible with HTTP Transfer-Encoding header are listed below:
Transfer-Encoding values. There is an end-to-end Content-Encoding header that can be use to compress the data over the whole connection.
syntax:
Transfer-Encoding: chunked | compress | deflate | gzip | identityDirectives: This header accepts five directives mentioned above and described below:
- chunked: This directive is used to send the series of data in a chunk format, but have to mentioned the length of each chunk before sending the chunk of the data in hexadecimal format like
'\r\n'and then the chunk itself, followed by another'\r\n'. - compress: It is a compression format using the Lempel-Ziv-Welch (LZW) algorithm.
- deflate: It is a compression format using the zlib structure, with the deflate compression algorithm.
- gzip: It is a compression format using the Lempel-Ziv coding (LZ77), with a 32-bit CRC.
- identity: This directive Indicates the identity function which is always acceptable.
HTTP/1.0 200 OK Content-Type: text/plain Transfer-Encoding: chunked 0\r\n Mozilla\r\n 7\r\n Developer\r\n 9\r\n Network\r\n 0\r\n \r\nTo check this Transfer-Encoding in action go to Inspect Element -> Network check the request header for Transfer-Encoding like below, Transfer-Encoding is highlighted you can see.
Supported Browsers: The browsers are compatible with HTTP Transfer-Encoding header are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera