TE Header

Table of Content

  • Syntax
  • Directives
  • Examples
  • Browser Compatibility
  • How to modify TE header The TE request-header field in HTTP communication is used to specify the transfer encodings the user agent (web browser or other client) is willing to accept. Its main purpose is to allow the client to request compressed content from servers to improve performance, and also allow chunked transfers where the response is sent as a series of "chunks".

Syntax

The syntax for the TE header is as follows:

TE: deflate, compress, chunked

Directives

The directives for the TE header include the values for accepted transfer encodings. The most common ones are 'chunked', 'compress', and 'deflate'.

  • deflate: Indicates that the client is willing to accept content encoded with the deflate algorithm.
  • compress: Suggests that the client can handle content encoded with the compress or gzip algorithms.
  • chunked: Implies that the client supports chunked transfers.

Examples

Here is an example of how the TE header field might look in an HTTP request:

GET /index.html HTTP/1.1
Host: www.example.com
TE: deflate, compress, chunked

Browser Compatibility

Browser Compatibility
Chrome Supported
Firefox Supported
Safari Not Supported
Opera Supported
Edge Supported

How to modify TE header

ModHeader is a Google Chrome extension that allows you to modify request headers in your browser. This can be useful for testing how your web application handles different headers, including TE.

After installing ModHeader, clicking on the extension icon brings up the user interface. There you can add headers using the 'Add' button and modify them by name and value. For example:

  1. Click ‘Add’ button
  2. Input TE as the header name
  3. Input deflate, compress, chunked as the value

This will then modify all outgoing HTTP requests from your browser to include the TE: deflate, compress, chunked header, allowing you to evaluate how your web application responds to this modification.