HTTP Headers | TE

The HTTP TE(also known as Accept-Transfer-Encoding) is a request-type header that specifies the transfer encodings that the user is willing to accept. It is very similar to the Transfer-Encoding response header. The difference is that this header uses another directive called trailers which is very related to the chunked directive.

Syntax:

TE: compress | deflate | gzip | trailers | q

Note: Multiple directives can be used.



Directives: The HTTP TE header accepts five directives as mentioned above and described below:

  • compress: It is a format that is accepted as a transfer-coding name using the Lempel-Ziv-Welch(LZW) algorithm.
  • deflate: It is a format that is accepted as a transfer-coding name using the zlib structure.
  • gzip: It is a 32-bit CRC format that is accepted as a transfer-coding name using the Lempel-Ziv-Welch(LZW) algorithm.
  • trailers: It tells about the willingness to accept trailer fields in a chunked transfer-coding.
  • q: When multiple directives are used then they are weighted by a quality value which is used to describe the priority of values.

Examples:

  • When single directive is used.
    TE: trailers
  • When multiple directives are used.
    TE: trailers, compress; q=0.67

To check the TE in action go to Inspect Element -> Network check the response header for TE like below.

Supported Browsers: The browsers are compatible with HTTP header TE are listed below:

  • Google Chrome
  • Internet Explorer
  • Microsoft Edge
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.