Why is the GET method faster than POST in HTTP?

后端 未结 8 2051
暗喜
暗喜 2020-11-30 02:53

I am new to web programming and just curious to know about the GET and POST methods of sending data from one page to another.

It is said that the GET method is faste

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 03:50

    GET is slightly faster because the values are sent in the header unlike the POST the values are sent in the request body, in the format that the content type specifies.

    Usually the content type is application/x-www-form-urlencoded, so the request body uses the same format as the query string:

    parameter=value&also=another When you use a file upload in the form, you use the multipart/form-data encoding instead, which has a different format. It's more complicated.

提交回复
热议问题