← Back to headers
HTTP Header
Trailer
GeneralLists the header fields that will be present in the trailer of a chunked transfer-encoded message.
HTTP header reference, syntax, examples, and developer usage.
What is the Trailer header?
The Trailer 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 header may appear in both HTTP requests and responses.
Syntax
Trailer: <header-name>[, <header-name>]
Example
Trailer: Expires
Common use cases
- Sending headers that can only be computed after the body is transmitted
- Appending integrity checks or checksums at the end of a streamed response
- Used in chunked transfer encoding for deferred metadata
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
Practical developer insight
Trailer allows certain headers to be sent after the response body in a chunked message, useful when the value is not known upfront (e.g. a checksum computed over the body). Not all headers are allowed as trailers — Content-Length, Transfer-Encoding, and Trailer itself are forbidden. Rarely needed in typical application code.