iT邦幫忙

2021 iThome 鐵人賽

1
Modern Web

還喝不 go系列 第 22

[13th][Day22] http response header(上)

之前看了 request 常用的 headers
接下來要看看 response 常用的 headers
一樣是看 Julia Evans 大大的可愛的圖

圖片來源:https://twitter.com/b0rk/status/1444296663577808897/photo/1

Age:response 被 cache 了多久 (s)
Date:response 在何時被 send 出
Last-Modified:內文最後何時被 異動
ETag:response body 的版本 ,通常是一串 hash
Cache-Control:各種 cache 設置
Vary:根據 req 的 header 而會有變化,通常是 accept-xxxxx
Via:由 proxy server 加上,ex: nginx
Expires:本次 response 的有效期限
Connection:close / keep-alive , 判斷 tcp 連線是否開啟


上一篇
[13th][Day21] golang context
下一篇
[13th][Day23] http response header(下)
系列文
還喝不 go23
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言