differences betweenGET andPOST
Posted: Thu Sep 30, 2010 12:30 am
What are the differences betweenGET andPOST methods in form submitting, give the case where we can use get and we can use post methods
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Well while it's true, it's not always trueDigitalMind wrote:use POST if you want your requests not to be cached
Just to elaborate - a GET request is vulnerable to CSRF thus a GET request should be used only and if only a pure "read" request is meant - i.e. no data changes required.AbraCadaver wrote:GET should only be used to retrieve or "get" data. Use POST to send data that will result in a consequence (delete record, insert record, send email, etc.).
It's a very dirty solution and it doesn't mean your requests won't be cached. The cache will be cluttered up.VladSun wrote:Well while it's true, it's not always true
GET caching is easily solved by adding an unique parameter to the GET request - like this:the {unique_value_here} is usually the current time in milliseconds (an ever incrementing value, thus it's unique).Code: Select all
http://domain.com?param1=value1¶m2=value2&....&__decache={unique_value_here}
It's widely used by a lot of frameworks (ExtJS for sure) in order to solve cross browser caching issues. Just take a look.DigitalMind wrote:It's a very dirty solution and it doesn't mean your requests won't be cached. The cache will be cluttered up.
In my opinion IE is just a tool needed to install a browserDigitalMind wrote:Nobody told it won't work. In my opinion it's bad approach.
Absolutely agreeVladSun wrote:In my opinion IE is just a tool needed to install a browser
Ну договорились!DigitalMind wrote:Absolutely agreeVladSun wrote:In my opinion IE is just a tool needed to install a browser