HTTPREF
← Back to headers

HTTP Header

Accept-Encoding

Request

Indicates which content encodings the client can understand.

HTTP header reference, syntax, examples, and developer usage.

What is the Accept-Encoding header?

The Accept-Encoding HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.

HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.

Direction

This is a request header sent by the client to the server.

Syntax

Accept-Encoding: gzip, br

Example

Accept-Encoding: gzip, br

Common use cases

  • Compressed responses
  • Improved performance
  • Bandwidth reduction

Common mistakes

  • Using the header in the wrong request or response context
  • Sending invalid header values
  • Incorrect header syntax
  • Assuming the header automatically changes server behaviour

Related headers