http相應頭和請求頭

2021-06-26 21:52:23 字數 1346 閱讀 7927

請求的細節

l  用於http

請求中的常用頭

l  accept: text/html,image/*       --支援資料型別

l  accept-charset: iso-8859-1  --字符集

l  accept-encoding: gzip    --支援壓縮

l  accept-language:zh-cn        --語言環境

l  host: www.itcast.com:80     --訪問主機

l  if-modified-since: tue, 11 jul 2000 18:23:51 gmt   --快取時間

l  referer:   --來自哪個頁面、防盜煉

l  user-agent: mozilla/4.0 (compatible; msie 5.5; windows nt5.0)

l  cookie

l  connection: close/keep-alive     --鏈結狀態

l  date: tue, 11 jul 2000 18:23:51 gmt --時間

響應細節

請求中的常用響應頭

l  location:   --跳轉方向

l  server:apache tomcat        --伺服器型號

l  content-encoding: gzip          --資料壓縮

l  content-length: 80           --資料長度

l  content-language: zh-cn      --語言環境

l  content-type: text/html; charset=gb2312       --資料型別

l  last-modified: tue, 11 jul 2000 18:23:51 gmt  --最後修改時間

l  refresh: 1;url=    --定時重新整理

l  l 

set-cookie:ss=q0=5lb_nq; path=/search

l  expires: -1                 --快取

l  cache-control: no-cache        --快取

l  pragma: no-cache                 --快取

l  connection: close/keep-alive            --連線

l  date: tue, 11 jul 2000 18:23:51 gmt    --時間

HTTP請求頭和相應頭的詳細介紹

收藏 請求頭accept 客戶機通過這個頭,告訴伺服器,它支援哪些資料型別 accept charset 客戶機通過這個頭,告訴伺服器,它支援的編碼 accept encoding 客戶機通過這個頭,告訴伺服器,支援哪種資料壓縮格式 accept language 客戶機採用的是哪個語言 host ...

HTTP請求頭和相應頭的詳細介紹

請求頭 accept 客戶機通過這個頭,告訴伺服器,它支援哪些資料型別 accept charset 客戶機通過這個頭,告訴伺服器,它支援的編碼 accept encoding 客戶機通過這個頭,告訴伺服器,支援哪種資料壓縮格式 accept language 客戶機採用的是哪個語言 host 客戶...

常見的請求頭和相應頭

1 請求 客戶端 服務端 request get 請求的方式 newcoder hello.html 請求的目標資源 http 1.1 請求採用的協議和版本號 accept 客戶端能接收的資源型別 accept language en us 客戶端接收的語言型別 connection keep al...