Backend Knowhows - atabegruslan/Notes GitHub Wiki
https://stackoverflow.com/questions/611906/http-post-with-url-query-parameters-good-idea-or-not
https://gist.github.com/atabegruslan/206f80fb948dedd99d78a5de153fbc3b
Query override using HTML form. The following is for "post".
<form action="/ideas/{{idea.id}}?_method=PUT" method="post">
<input type="hidden" name="_method" value="PUT">
</form>
Query override using HTML form. The following is for "delete".
<form method="post" action="/ideas/{{id}}?_method=DELETE">
<input type="hidden" name="_method" value="DELETE">
</form>
https://stackoverflow.com/questions/3923904/preventing-form-resubmission
- Use AJAX + Redirect
This way you post your form in the background using JQuery or something similar to Page2, while the user still sees page1 displayed. Upon successful posting, you redirect the browser to Page2.
- Post + Redirect to self https://en.wikipedia.org/wiki/Post/Redirect/Get
This is a common technique on forums. Form on Page1 posts the data to Page2, Page2 processes the data and does what needs to be done, and then it does a HTTP redirect on itself. This way the last "action" the browser remembers is a simple GET on page2, so the form is not being resubmitted upon F5.