Back to Content

Early-Data header

files/en-us/web/http/reference/headers/early-data/index.md

latest1.9 KB
Original Source

{{SeeCompatTable}}

The HTTP Early-Data {{Glossary("request header")}} is set by an intermediary to indicate that the request has been conveyed in TLS early data, and also indicates that the intermediary understands the {{HTTPStatus("425", "425 Too Early")}} status code.

If a client has interacted with a server recently, early data (also known as zero round-trip time (0-RTT) data) allows the client to send data to a server in the first round trip of a connection, without waiting for the TLS handshake to complete. This reduces latency for repeat connections between a client and server, but has security implications, as early data is susceptible to replay attacks.

The Early-Data header is not set by the originator of the request (i.e., a browser).

<table class="properties"> <tbody> <tr> <th scope="row">Header type</th> <td>{{Glossary("Request header")}}</td> </tr> <tr> <th scope="row">{{Glossary("Forbidden request header")}}</th> <td>No</td> </tr> </tbody> </table>

Syntax

http
Early-Data: 1

Examples

A GET request with an Early-Data header

A client that wants to use early data can send HTTP requests immediately after sending the TLS ClientHello. Sending a request in early data implies that the client is willing to retry a request in response to a {{HTTPStatus("425", "425 Too Early")}} status code, so the Early-Data header is not included:

http
GET /resource HTTP/1.1
Host: example.com

An intermediary that forwards a request prior to the completion of the TLS handshake with its client sends it with the Early-Data header set to 1:

http
GET /resource HTTP/1.1
Host: example.com
Early-Data: 1

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also