域名解析
依次查找:
- 浏览器缓存
- 本地 hosts 文件
- 本地 DNS 解析器缓存
- 本地 DNS 服务器
建立 TCP 连接
mermaid
sequenceDiagram
autonumber
participant a as Client
participant b as Server
a->>b: SYN
Note left of a: SYN_SEND
b-->>a: SYN+ACK
Note right of b: SYN_RECV
a->>b: ACK
Note over a,b: ESTABLISHED
HTTP 请求
服务端解析请求头的缓存设置:if-none-match、if-modified-since,缓存有效则响应状态码为 304,否则状态码为 200。 详见缓存机制
关闭 TCP 连接
mermaid
sequenceDiagram
autonumber
participant a as Host1
participant b as Host2
a->>b: FIN
Note left of a: FIN_WAIT_1
b-->>a: ACK
Note left of a: FIN_WAIT_2
b-->>a: FIN
Note right of b: LAST_ACK
a->>b: ACK
Note left of a: TIME_WAIT