# RTT header



The HTTP **`RTT`** [request header](https://developer.mozilla.org/en-US/docs/Glossary/request%20header) is a [network client hint](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Client_hints#network_client_hints) which provides the approximate round trip time on the application layer, in milliseconds.
The RTT hint includes server processing time, unlike transport layer RTT.

The RTT value is rounded to the nearest 25 milliseconds to prevent [fingerprinting](https://developer.mozilla.org/en-US/docs/Glossary/Fingerprinting), although there are many other mechanisms an attacker might use to obtain similar round-trip information.

The hint allows a server to choose what information is sent based on the network responsiveness/latency. For example, it might choose to send fewer resources.

> **NOTE:**
> The [Vary](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Vary) header is used in responses to indicate that a different resource is sent for every different value of the header (see [HTTP Caching Vary](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching#vary)). Even if `RTT` is used to configure what resources are sent consider omitting it in the [Vary](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Vary) header — it is likely to change often, which effectively makes the resource uncacheable.

<table class="properties">
  <tbody>
    <tr>
      <th scope="row">Header type</th>
      <td>
        [Request header](https://developer.mozilla.org/en-US/docs/Glossary/Request%20header),
        <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Client_hints">Client hint</a>
      </td>
    </tr>
    <tr>
      <th scope="row">[Forbidden request header](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden%20request%20header)</th>
      <td>No</td>
    </tr>
  </tbody>
</table>

## Syntax

```http
RTT: <number>
```

## Directives

- `<number>`
  - : The approximate round trip time in milliseconds, rounded to the nearest 25 milliseconds.

## Examples

### Using RTT client hints

A server first needs to opt in to receive the `RTT` header by sending the [Accept-CH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-CH) response header containing `RTT`.

```http
Accept-CH: RTT
```

Then on subsequent requests the client might send an `RTT` header back:

```http
RTT: 125
```

## Specifications

## Browser compatibility

## See also

- [Downlink](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Downlink), [ECT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ECT), [Save-Data](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Save-Data) network client hints
- [Accept-CH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-CH)
- [HTTP Caching: Vary](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching#vary) and [Vary](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Vary)
- [NetworkInformation.effectiveType](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/effectiveType)
- [Improving user privacy and developer experience with User-Agent Client Hints](https://developer.chrome.com/docs/privacy-security/user-agent-client-hints) (developer.chrome.com)
