[ACCEPTED]-How to prevent browser from remembering text field content?-browser

Accepted answer
Score: 23

For browsers that support it, there's the 26 new autocomplete attribute. From the link:

The autocomplete attribute is an 25 enumerated attribute. The attribute has 24 three states. The on keyword maps to the on state, and 23 the off keyword maps to the off state. The attribute 22 may also be omitted. The missing value default is the default state.

The 21 off state indicates either that the control's 20 input data is particularly sensitive (for 19 example the activation code for a nuclear 18 weapon); or that it is a value that will 17 never be reused (for example a one-time-key 16 for a bank login) and the user will therefore 15 have to explicitly enter the data each time, instead 14 of being able to rely on the UA to prefill 13 the value for him; or that the document 12 provides its own autocomplete mechanism 11 and does not want the user agent to provide 10 autocompletion values.

...although in the 9 specific case you describe, I think I'd 8 probably just keep the € symbol outside 7 the field's value in the first place. You 6 can put it next to the field, or superimpose 5 it on the field using CSS (for instance, put 4 it after the field in the markup and then 3 use position: relative; left: -3em, that sort of thing). But if you really 2 want to prevent the browser's auto-filling, autocomplete is 1 one tool for the toolchest.

More Related questions