Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How do you disable browser autocomplete on web form field / input tags?

How do you disable autocomplete in the major browsers for a specific input (or form field)?
by

3 Answers

Bharatv4tg1
<form name="form1" id="form1" method="post"
autocomplete="off" action=" //www.example.com/form.cgi">

This will work in Internet Explorer and Mozilla Firefox. The disadvantage is that it isn't XHTML standard.
MounikaDasa
Firefox 30 ignores autocomplete="off" for passwords, opting to prompt the user instead whether the password should be stored on the client. Note the following commentary from May 5, 2014:

The password manager always prompts if it wants to save a password. Passwords are not saved without permission from the user.
We are the third browser to implement this change, after IE and Chrome.
According to the Mozilla Developer Network documentation, the Boolean form element attribute autocomplete prevents form data from being cached in older browsers.

<input type="text" name="foo" autocomplete="off" />
sandhya6gczb
Just use the autocomplete attribute:

<input name="q" type="text" autocomplete="off"/>

This would be useful when a text input is one among CAPTCHA , one time password or passsword.

Login / Signup to Answer the Question.