|
|
Which is better for AJAX requests, GET or POST? - Javascript
|
Views : 296
|
|
Tagged in : Javascript
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
As per HTTP protocol specifications, client browsers send http post requests in two-step processes: 1) send the headers, 2) send the data.
Therefore, for websites with high volume traffic, it's definitely preferable to choose GET method for AJAX requests over HTTP, because all it takes for GET to get out is a URL request, which is basically a TCP packet if you don't have a lot of cookies.
However, as there is a limit on the length of the URL in Internet Explorer which is approximately 2k, so technically you canât send a GET request with data more than that.
Another approach is to determine whether to use GET or POST is that, according to HTTP specification, GET is for fetching data while POST is for supplying. In this sense, use GET for data retrieval tasks and POST for data input tasks.
|
|
By kalai, On - 2010-02-01 |
|
|
|