Why is the GET method faster than POST in HTTP?

后端 未结 8 2050
暗喜
暗喜 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条回答
  •  醉酒成梦
    2020-11-30 03:40

    It's not much about speed. There are plenty of cases where POST is more applicable. For example, search engines will index GET URLs and browsers can bookmark them and make them show up in history. As a result, if you take actions like modifying a DB based on a GET request, it might be harmful as some bots might also traverse the URL.

    The other case can be security issue. If you post credentials using GET, it'll get listed in browser history and server log files.

提交回复
热议问题