Fish TouchingšŸŸšŸŽ£

HTTP Version

Nov 3, 2023

# HTTP Version History


# HTTP 1


# HTTP 1.1

image.png

image.png

GET / HTTP/1.1

Host: www.freebsd.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
If-Modified-Since: Mon, 09 May 2005 21:01:30 GMT
If-None-Match: "26f731-8287-427fcfaa"
HTTP/1.1 200 OK

Date: Fri, 13 May 2005 05:51:12 GMT
Server: Apache/1.3.x LaHonda (Unix)
Last-Modified: Fri, 13 May 2005 05:25:02 GMT
ETag: "26f725-8286-42843a2e"
Accept-Ranges: bytes
Content-Length: 33414
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html

# HTTP 2

 +-----------------------------------------------+
 |                 Length (24)                   |
 +---------------+---------------+---------------+
 |   Type (8)    |   Flags (8)   |
 +-+-------------+---------------+-------------------------------+
 |R|                 Stream Identifier (31)                      |
 +=+=============================================================+
 |                   Frame Payload (0...)                      ...
 +---------------------------------------------------------------+

image.png

image.png

curl --http2 https://www.example.com -I -v

HTTP/1.1 200 Connection established

* using HTTP/2
* h2 [:method: HEAD]
* h2 [:scheme: https]
* h2 [:authority: www.example.com]
* h2 [:path: /]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x127012800)
> HEAD / HTTP/2
> Host: www.example.com
> User-Agent: curl/8.1.2
> Accept: */*

HTTP/2 200 
accept-ranges: bytes
age: 136909
cache-control: max-age=604800
content-type: text/html; charset=UTF-8
date: Sun, 08 Oct 2023 02:28:20 GMT
etag: "3147526947"
expires: Sun, 15 Oct 2023 02:28:20 GMT
last-modified: Thu, 17 Oct 2019 07:18:26 GMT
server: ECS (laa/7BA2)
x-cache: HIT
content-length: 1256

# HTTP 3

image.png

image.png

image.png


# Comparisons

# Similarities

# Differences

The differences are in the details and primarily there thanks to HTTP/3’s use of QUIC: