Possible Duplicate:
When do you use POST and when do you use GET?
If I use jQuery ajax call to communicate with server, in general, when should I use type get
to call and when should I use post
to call ?
Possible Duplicate:
When do you use POST and when do you use GET?
If I use jQuery ajax call to communicate with server, in general, when should I use type get
to call and when should I use post
to call ?
POSSIBLE DUPLICATE: When do you use POST and when do you use GET?
GET:
POST:
Ref:
http://www.cs.tut.fi/~jkorpela/forms/methods.html
http://thinkvitamin.com/code/the-definitive-guide-to-get-vs-post/
You need to know their differences, to know which to use. When the GET request is used, the sent data is shown in the address bar, with the url. The POST request is used to send data to the server without showing it anyway. And also POST is used to send files or other large data.
So if you're sending confident info like password, you use POST. When you're passing a data to be used in the page like "page=about" or "article_id=2", use GET.
instead of using get i usually just use $.load and fetch code chunks and insert them into the dom. i use post for pretty much everything else, or getJSON.