天天看點

Http:get和post請求的差別

Http:get和post請求的差別

1. get 參數一般在 url裡或者 cookie裡, post參數在body中

2. get的url會有長度上的限制(最大長度2048個字元),post的資料則可以非常大

3. post比get 更為安全,因為資料在位址欄上不可見(但是抓包可見)

4. 一般get請求用來擷取資料,post請求用于發送資料

5. get請求可被緩存,post請求不會被緩存

6. get請求會保留在浏覽器曆史記錄中,post請求不會保留

7. get請求可被收藏為書簽,post不能被收藏為書簽

繼續閱讀