On an HTML page when I make a HTTP POST submission, it redirects to another page as a result.
On the redirected page, user can come back to form page and see the submitted values again by hitting the back button of the browser. This is not much of a problem but think about this scenario:
A user goes to a public internet cafe and buy something with a credit
card. Then leaves the Internet Cafe and forgot to close the browser.
The next user comes to that desk and hit back button and boom!
An ignorant user about internet can blame the company for that action.
What I would like to do is to reset the HTML form after the form submission and prevent user to come back and see the submitted data.
I can use a simple JavaScript code to do that. For example, something like below:
<script>
$("input[type='text']").val(null);
</script>
But, JavaScript can be disabled.
I am developing this app on ASP.NET MVC but I don’t think that there is any way to solve this issue on server side.
Any idea?
Even if you clear out the form fields, their values will be delivered as auto-complete entries. You can stop this by switching off auto-completion:
Which I know is supported by Internet Explorer and Firefox for HTML4 and is in the HTML5 specification.