I am learning asp.net mvc form processing now and confused with the following:
What happens if we push the refresh button on the browser? It makes a POST or GET request?
This is dependant on the last call that was made by the browser to get the current data. Eg:
a) If you submitted a form, performing a POST and then hit refresh, the browser will do another POST.
b) If you just clicked a link that took you to another page, performing a GET, you'll a refresh will perform a get.
If you're just starting out understanding the GET/POST methods, there is a nice pattern that you should understand that will help you not get in situations where data is posted again and again by users who constantly refresh the browser after a POST:
http://en.wikipedia.org/wiki/Post/Redirect/Get
and
An example specifically for asp.net MVC
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With