The Wayback Machine - https://web.archive.org/web/20240204103726/https://www.geeksforgeeks.org/http-headers-trailer/
Open In App
Related Articles

HTTP headers | Trailer

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

The HTTP Trailer header is a response header that indicates the given set of header fields is present in the trailer of a message encoded with chunked transfer-coding and allows the sender to include additional fields at the end of chunked messages in order to supply metadata.

Syntax:

Trailer: header-names

Directives:

  • header-names: It is a set of header fields that are present in the trailer of a message encoded with chunked transfer-coding.

Examples:

  • In this example, the header that is being used is Max-Forwards which is a request modifier.
    Trailer: Max-Forwards
  • In this example the header that is being used is the Host header which is a routing header.
    Trailer: Host
  • In this example Trailer header with a large amount of data from a database query, which is a chunked response. The Expires header is used in this example.
    HTTP/1.0 200 OK 
    Content-Type: text/plain 
    Transfer-Encoding: chunked
    Trailer: Expires
    
    0\r\n
    Mozilla\r\n 
    7\r\n
    Developer\r\n
    9\r\n
    Network\r\n
    0\r\n 
    \r\n

Supported Browsers: The browsers compatible with HTTP Trailer header are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Looking for a place to share your ideas, learn, and connect? Our Community portal is just the spot! Come join us and see what all the buzz is about!


Last Updated : 07 Nov, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials