What is autocomplete?
Autocompletion, which was first introduced by Microsoft Internet Explorer, is the browser feature of remembering what you entered in previous text form fields with the same name. So, for example, if the field is named name and you had entered several variants of your name in other fields named name, then autocompletion provides those options in a dropdown.
Most modern browsers (IE5+, Firefox) can be configured to remember the information users type into web forms.
This feature is called Form and Password Autocompletion in Gecko browsers. The feature is known in other browsers by names such as “Form Pre-filling”, “Roboform”, “Remember password”, “Form fill in”, “Fill in form” and/or “Wallet”.
Firefox can remember what you’ve entered in forms on web pages, also known as text fields. After you’ve entered something into a form on a web page (such as a search box), the next time you visit that page, your previous entry will be available to re-use.
This feature is most useful for remembering usernames and passwords.
Why would you want autocomplete disabled?
The web forms are used to enter all sorts of data. In some cases, the data may be sensitive and therefore you would like that data not to be entered by the browser, but re-typed by the user each time that form is filled in. Otherwise, the form fields would get populated with the sensitive data you entered previously.
An example of such data is a credit card number or in the case of Jira, username and password when creating a new user.
Can I turn autocomplete ON/OFF programmatically?
The behavior and the data the autocomplete fills in can be modified (at least for some browsers). With extensions, you can change Firefox’s form filling behavior and add new features.
You can not turn the autocomplete ON if the user has this feature disabled in the browser or if the browser does not support it.
However, you can turn the autocomplete OFF. You can do so for a field or for a whole form. The easiest and simplest way to disable Form and Password storage prompts and prevent form data from being cached in session history is to use the autocomplete form element attribute with value “off”. The only downside to using autocomplete attribute is that it is not standard (W3C form and input tag specification), and would cause XHTML validation to fail.
To disable autocomplete for a particular field, add autocomplete=”off” attribute to that field, e.g. text input field for a name:
<form ...> ... <input type="text" name="name" autocomplete="off"> ... </form>
To disable autocomplete for a whole form, add autocomplete=”off” attribute to the form tag:
<form autocomplete="off" ...> ... <input type="text" name="name"> ... </form>