+ 2
What is the difference of GET method and POST method??
10 Réponses
- 2
woow patta bro
+ 5
GET and POST methods differs in the way used to send data (commonly from forms) to the server, by appending textual key/values pairs at URL (named a 'query string'), or inside the Http header (as well as cookies, which are availabled by this way at server side).
Example of Get request Url:
http://mydomain.com/mysite/mypage.html?key1=val1&key2=val2
It's considered unsafe in first case (GET, data in URL), as data are visible from anybody, and mainly:
> by browsers possibility it can be:
- be cached
- remain in the browser history
- be bookmarked
> just by user copying-pasting it can be:
- distributed & shared
- simply hacked
Contrarly, in a Post method, the data is no more visible directly by an human in the Url, but is embeded in the Http header, wich is a data-set of information initiating a communication between an internet browser on a user PC through the web protocol Http to server and reciprocally (they handle for example the Http error messages when the request fail in server-browser response way, or the user agent information about browsers in browser-server way).
With AJAX, wich use Http requests too (without reloading/replacing the actual page), Get method has no more really 'unsafe' problems, as the most inconvenients disapears (not cached nor reamining in history, not bookmarkabled nor simply hackabled)
Anyway, by Post method, data are unsafe exchanged while you don't use Https crypted version of protocol ^^
With common Http uncrypted, you need to consider Post method less unsafe than Get, rather than more safe :P
+ 3
The data send by get method is visible, you can see it in the url, the post method is hidden
+ 3
Don't give yourself the best answer mark, especially after having set it on an answer: this doesn't give you any XP, show a bad image of you, and pervert the purpose to keep useful answer as top ^^
+ 2
Just adding to noname
POST method is more secured than GET method therefor
POST methid is used for passwords and all other sensitive information
+ 2
POST is intended to permanently change data. (it's why some pages ask if you are sure you want to resubmit)
GET is intended never to change data. (it's why you are never asked if you want to GET again--it just does--when navigating)
The relevant term for these two verbs is "idempotence" (idempotency).
+ 2
@visph - thanks for taking the time on those methods/verbs, especially "less unsafe" -- that's appropriate. Your answer is more complete :)
+ 1
thanks kollo
+ 1
love you sudu😘😘
+ 1
woow big help dude