1

Say I have Page A that has a cool POST form that submits and then goes to Page Z.

Right now on Page A, I have autocomplete='off' on all forms and all form inputs.

Currently:

  1. Go to Page A and submit the form with data.
  2. See Page Z and hit the back button on the browser.
  3. Page A has the form displayed with submitted data (from 1).

How do I clear the form data from Page A or prevent it from being shown when I click the back button on Page Z?

Note: the form data is being cleared in Firefox (except checkboxes) and Chrome, but not in IE (using 10 to debug). I would like all the form data from all types of input to be empty.

Derek
  • 11,980
  • 26
  • 103
  • 162

1 Answers1

1

You are probably getting it from the cache, make a form reset on load and your forms will be resetted to default values. I am doing it on 95% of my forms.

$('form').each(function() {
    this.reset();
});

This only apply to inputs inside a form.

Loenix
  • 1,057
  • 1
  • 10
  • 23