When should I use GET or POST method? What's the difference between them?

后端 未结 14 1768
-上瘾入骨i
-上瘾入骨i 2020-11-21 06:44

What\'s the difference when using GET or POST method? Which one is more secure? What are (dis)advantages of each of them?

(similar question

14条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-21 07:39

    You should use POST if there is a lot of data, or sort-of sensitive information (really sensitive stuff needs a secure connection as well).

    Use GET if you want people to be able to bookmark your page, because all the data is included with the bookmark.

    Just be careful of people hitting REFRESH with the GET method, because the data will be sent again every time without warning the user (POST sometimes warns the user about resending data).

提交回复
热议问题