My question is - what is the difference between page refresh (if I press f5) and postback (If I press a button)?
Can anyone please tell me?
Thanks in advance.
A refresh mean a complete reload of the page, without any form data. This is essentially an HTTP GET
.
A post back is when the page is posted to itself (through the form action=""
). This is essentially an HTTP POST
.
Lets have the actual difference between refresh and explicitily submitting a page :
1) Refresh does not mean to post back the page with get method..(You can check it with response.write request.form("some input type")).
2)Difference lies with the data sent to the server : in case of explicit submit form is submitted with latest value(i.e it recognize the changes in form elements) But in case of refresh, form is submitted with default form value.(i.e if you change the value of form element it will not reflect at server.)
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