2

I am doing a web application and notice one thing that happens only in Firefox.

I have a form. I am able to enter a string in an input field.

If I position my mouse in the address bar and hit the enter key, the field shows its original value (blank or an existing value). However, if I enter a new value in the field, and then, without submiting the form, click the page reload button (in the right-side of the address bar), the new value shows there (not the original value).

This does not happen in IE or Chrome that I tested.

Does anyone know why?

Thanks and regards.

curious1
  • 14,155
  • 37
  • 130
  • 231
  • I found the answer on this thread. http://stackoverflow.com/questions/2486474/preventing-firefox-from-remembering-the-input-value-on-refresh-with-meta-tag – curious1 Aug 19 '13 at 00:19

1 Answers1

1

Imagine you spent 3 hours writing something and you somehow reloaded page, everything can be lost, so Firefox auto fill these fields for you. It helps you to not loose data.

Sometimes reloading page keeps some relationship with previous state, while re-getting - not. Example you submit form. Re-get will load page again with default values, reloading will try to resubmit form.

ViliusL
  • 4,589
  • 26
  • 28
  • Is there any way to prevent FF from "remembering" the new values? This "remembering" can create bad data or user experience. For example, I have a field with a few radio buttons. Remembering the radio button's new value when page reload, not the original value, make make user believe that is what the current persistent state of data, which is actually not. Thanks! – curious1 Aug 19 '13 at 00:08
  • 1
    You can provide reset button, or after document load check important input values with JS. Also there is something like form.reset(). But dont forget that in many cases this default behaviour helps user. – ViliusL Aug 19 '13 at 18:13