---
topic: web-development
author: Crashtech Editorial
published: Nov 17, 2026 · read: 4 min
---

Firefox 160 Adds WebTransport Handshake Headers—with Cookie Limits

Firefox 160 adds WebTransport handshake headers and exposes responses. Learn token handling, cookie limits, Origin checks, and deployment caveats.

– –

WebTransport starts with an HTTP extended CONNECT handshake, then keeps a session open for streams and datagrams. Firefox 160’s November developer notes add custom request headers to that setup and expose server response headers once the session is ready. That makes some handshake designs cleaner, especially when an application previously put short-lived credentials in a URL. The security boundary remains the handshake: a browser API option does not authenticate a client by itself. [1]

Two observatories exchange a small envelope across a bridge before a pair of persistent transport paths continue; a cookie jar sits apart.
Conceptual illustration of a one-time WebTransport setup exchange followed by a persistent session; it does not depict a browser implementation.

What the new options do

The headers constructor option adds custom HTTP request headers to the extended CONNECT request used to set up the session. Mozilla’s documentation says this can carry information such as an authentication token in a request header rather than in the URL query string. Once the session has been established, responseHeaders exposes headers from the server’s setup response, except the reserved WT-Protocol header. [2] [3]

That distinction matters because these headers belong to session establishment. They are not a per-datagram or per-stream metadata mechanism. The application sends them when constructing the transport; it can then read the response headers after the ready promise resolves. A server may use a response field for application-specific setup information, but it should avoid returning secrets that are unnecessary to the client.

The Firefox release note documents the change in Firefox 160, while MDN describes the API semantics. That is a specific browser implementation milestone, not a claim that every browser and server stack has identical support on the same date. Check the current compatibility information for the clients you support and test the server’s extended CONNECT path before shipping. [1]

The constructor documentation explicitly says forbidden request headers such as Cookie are silently ignored. It also reserves WT-Available-Protocols, which is set through the protocols option instead. A developer who assumes that passing a cookie header succeeded could end up with a request that lacks the intended session context. Test the actual browser behavior and design the authentication flow around supported headers, not assumptions. [2]

WebTransport’s browser API also requires a secure context. The WebTransport API’s security model uses the request’s Origin; servers should validate that origin against an explicit allowlist before accepting a session. An authorization header can carry a bearer token, but that token needs the same care as any credential: short lifetime, appropriate scope, TLS protection, redaction from logs and explicit rejection on invalid or expired values. Moving it out of a URL reduces one common exposure path, but does not make it safe to log or reuse indefinitely.

Cross-origin deployment details deserve a server-side test. WebTransport uses extended CONNECT rather than an ordinary fetch flow, so teams should verify the browser, proxy, load balancer and server all preserve the expected handshake behavior. A successful object construction does not prove the server accepted the connection or that the response metadata is available; wait for ready and handle rejection.

A practical migration pattern

If an application currently puts a token in the query string, compare that design with a short-lived header token. Create the token through an authenticated application step, pass it in the constructor’s headers option, and have the server validate it during the handshake. Do not attempt to smuggle cookies into the option. Keep origin validation separate from token validation: the token answers whether the request holds a credential, while Origin helps constrain which web page may initiate the browser connection.

On the response side, treat responseHeaders as metadata from the setup response, not proof that application-level authorization is complete. The API describes the headers returned by the server; the application must decide which are trustworthy and useful. If exposing a server-generated session identifier, ensure it is not a reusable bearer secret and define its lifetime.

Test at least an accepted token, missing token, expired token, disallowed Origin, unsupported browser, failed handshake and successful session. Confirm query strings and credentials are absent from access logs and error reporting. Exercise both stream and datagram paths if the application uses both, because handshake success does not validate the full session behavior.

A small API change with a clear boundary

The new options make an existing protocol boundary easier to use: For more context, see what HTTP/3 and QUIC change and binding OAuth codes to a client. request metadata enters when the session is opened and response metadata can be read after it succeeds. This can improve credential placement and setup decisions. It does not replace application authentication, browser compatibility checks or origin validation. Teams can use Firefox 160 as a prompt to audit their WebTransport setup, but should verify each target browser and infrastructure path before relying on the behavior.

Advertisement

Frequently asked questions

What changed in Firefox 160 for WebTransport?

The Firefox 160 developer release notes say the WebTransport constructor accepts a headers option for the extended CONNECT request, and response headers are available through responseHeaders after the session is established.

Can WebTransport custom headers include cookies?

No. The constructor documentation says forbidden request headers such as Cookie are silently ignored. The WT-Available-Protocols header is also reserved and cannot be set through this option.

Can an auth token now be moved from a WebTransport URL into a request header?

The API supports custom headers on the setup request, which can avoid putting a token in a query string. The server still needs to authenticate the token, validate Origin and protect logs; browser support should be checked for target clients.

Sources & further reading

/* Comments */