Originally posted by Brijesh shah:
same operation applied multiple times yields the same result means in which manner..
Imagine an operation that retrieves a particular database record for display. The URL might be something like ".../showOrder?orderID=123456" and is implemented with a GET. Idempotency means that accessing the URL one time or multiple times yields the same result. Clearly it does in this case - accessing this URL gives you the same result every time you access it. It retrieves the web page that shows the record. You can hit reload in the browser as many times as you want - the result is always going to be exactly the same page.
Now, POST is generally used to change something, e.g. inserting a new record into a database. If you have just submitted a form that adds a new order record to the database, and if you then hit Reload (in other words, you access the same URL again), you'd be inserting another record. That means the result would not be the same. That's why browsers generally ask the user before reloading a page that was the result of a POST - because POSTs often change something, and doing the same change twice is usually not what the user wants. (As an aside, that's also the reason of existence for the
PostRedirectGet technique. It allows you to submit something with POST, and then show a page that can be reloaded without problems.)
[ November 23, 2007: Message edited by: Ulf Dittmer ]