Open In App

HTTP Headers | TE

Last Updated : 28 Nov, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

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

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads