Specifies the encoding used to transfer the response to the client.

The Transfer-Encoding header is an older HTTP1.1 option that allows the server to indicate the encoding used to transfer the response from hop to hop along the path from server to client. Each hop could use a different encoding. If the server uses newer versions of the HTTP protocol, then this header is not allowed.

It is possible to use this header to compress the contents, but it is usually better to use the Content-Encoding instead as it will compress the data over the whole connection instead of just a single hop. Another usage of this header is to use the chunked value and send the document in a series of chunks. This can be useful if the size of the file is not known ahead of time, or if the server needs to set headers after some content has already been sent.

For more information, please read the documentation on MDN Web Docs.

Ready to validate your website to check for this header and 100+ others important tests?