How should I choose between GET and POST methods in HTML forms?

后端 未结 17 1580
醉话见心
醉话见心 2020-11-27 18:42

I wish to know all the pros and cons about using these two methods. In particular the implications on web security.

Thanks.

17条回答
  •  眼角桃花
    2020-11-27 19:08

    It depends on the type of data and size of data you want to transfer. With GET you can pass a maximum of 255 characters to the action page. With POST method, you dont have such limitations. POST gives more privacy to the data as it is not displayed anywhere. Anything you send using the GET method is displayed in the address bar of the broser.

    Many of the search sites normally uses the GET method as this gives you the facility to bookmark your search queries. Hope this helps.

提交回复
热议问题