> For the complete documentation index, see [llms.txt](https://http3-explained.haxx.se/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://http3-explained.haxx.se/ja/h3/h3-h2.md).

# HTTP/2 と比較した HTTP/3

HTTP/3 は、自身でストリームを処理するトランスポートプロトコルである QUIC に合わせた設計になっています。

HTTP/2 は TCP を前提とした設計のため、HTTP レイヤーでストリームを処理します。

## 類似点

この2つのプロトコルは、クライアントに対して事実上同じ機能を提供します。

* どちらのプロトコルも、サーバープッシュのサポートを提供します。
* どちらのプロトコルもヘッダー圧縮が提供され、QPACK と HPACK は設計上似ています。
* どちらのプロトコルも、1つの接続でストリームによる多重化が提供されます。

## 相違点

差異は主に詳細にあり、HTTP/3 が QUIC を利用することによるものです。

* TCP Fast Open と TLS では、一般的にあまりデータ量を送信せず、しばしば問題を引き起こす一方で、HTTP/3 は QUIC の 0-RTT ハンドシェイクのおかげで、early data のサポートがあります。
* HTTP/3 は QUIC のおかげで TCP と TLS の組み合わせより高速なハンドシェイクを実現します。
* HTTP/3 では全て暗号化された安全な通信です。HTTP/2 は、インターネット上においては稀なことであるにせよ、 HTTPS なしで実装することも可能です。
* HTTP/2 では TLS ハンドシェイクを ALPN 拡張 を用いて、直接ネゴシエーションが可能です。一方で、HTTP/3 は 事実上、QUIC 上で動くため、クライアントにこの内容を知らせるため `Alt-Svc:` ヘッダーレスポンス が最初に必要です。
* HTTP/3 は優先度制御を提供しません。HTTP/3 において採用予定だった HTTP/2 の優先度制御に対するアプローチは、複雑すぎるかあるいは紛れもない失敗とみなされており、より単純な仕組みを作る取り組みが行われています。現在予定されているより単純な仕組みは、HTTP/2にバックポートし、HTTP/2の拡張仕様の優先度制御を利用することです。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://http3-explained.haxx.se/ja/h3/h3-h2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
