demo · v143

Protocol negotiator sim

Type your client offer list and your server's supported list. Watch the negotiation pick a winner (or fail), and see the actual HTTP headers Chrome would send and the server would respond with. The final "live" section attempts a real new WebTransport(url, { protocols }) against any URL you give it.

Behind a flag: WebTransport application protocol negotiation lands in v143 behind chrome://flags/#enable-experimental-web-platform-features. The simulator works in any browser; the live probe at the bottom requires the flag and a compatible server.

Negotiation simulator

client offers (one per line, ordered by preference)

server supports (set; unordered)

Wire format

Live probe — attempt a real WebTransport handshake

What the negotiation does

  1. Browser sends WT-Available-Protocols: a, b, c in the connection request.
  2. Server picks one with WT-Protocol: a in its response.
  3. The browser exposes the picked one as transport.protocol after the connection is ready.
  4. If the server picks none, the connection still establishes (provided the underlying handshake succeeds) but transport.protocol is the empty string.
const transport = new WebTransport("https://example.com/wt", {
  protocols: ["game-v3", "game-v2", "chat-v1"],
});
await transport.ready;
console.log("server picked:", transport.protocol);

see also