There are 3 forms for update data on the page: 1st is for user profile, 2nd - for password reset, 3rd - for changing e-mail. I made sending forms to controller and redirect to the same page. Project team leader asked to remove those redirects and said that people don't refresh the page after submitting the form and redirects will only load the server... I could be wrong but redirects are always supposed to be done after sending POST request. My suggestion about making all forms via AJAX was declined. How can I prove competently that there is a need for redirect if I'm not mistaken?
The point you are looking for is the Post-Redirect-Get pattern.
You can read the original article here: http://www.theserverside.com/news/1365146/Redirect-After-Post
It exposes all the motives ; in short, the pattern prevent double-submit (because the page is slow, so the user loose patience) and allows the browser to safely refresh the (last) page, without risking to re-submit data (or at least having that pop-up warning you you are re-submitting data).
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