Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. Headers
  5. Trailer

Trailer header

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The HTTPTrailerrequest andresponse header allows the sender to include additional fields at the end of chunked messages in order to supply metadata that might be dynamically generated while the message body is sent.

Note:TheTE request header needs to be set totrailers to allow trailer fields.

Warning:Developers cannot access HTTP trailers via the Fetch API or XHR.Additionally, browsers ignore HTTP trailers, with the exception ofServer-Timing.SeeBrowser compatibility for more information.

Header typeRequest header,Response header,Content header
Forbidden request headerYes

Syntax

http
Trailer: header-names

Directives

header-names

HTTP header fields which will be present in the trailer part of chunked messages.The following header names aredisallowed:

Examples

Server-Timing as HTTP trailer

Some browsers support showing server timing data in developer tools when theServer-Timing header is sent as a trailer.In the following response, theTrailer header is used to indicate that aServer-Timing header will follow the response body.A metriccustom-metric with a duration of123.4 milliseconds is sent:

http
HTTP/1.1 200 OKTransfer-Encoding: chunkedTrailer: Server-Timing--- response body ---Server-Timing: custom-metric;dur=123.4

Specifications

Specification
HTTP Semantics
# field.trailer
HTTP/1.1
# chunked.trailer.section

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp