How do you disable browser Autocomplete on web form field / input tag?

Input text autocomplete is that the default feature of any browser. whereas operating with the shape or input fields in hypertext markup language web content autocomplete feature of the browsers are available the image. By default autocomplete is enabled in browsers thus once submitting the shape it remembers the knowledge. thus once once more open identical kind or fill identical input fields it shows the suggestions that were stuffed earlier by the user.

The autocomplete attribute is employed to change and disable autocompletion of text. This attribute contains 2 values:

on
off
To disable the autocomplete feature within the kind or input field the autocomplete attribute set to off.

autocomplete="off"

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" />

Why? Many banks and other "high security" websites added autocomplete=off to their login pages "for security purposes" but this actually decreases security since it causes people to change the passwords on these high-security sites to be easy to remember (and thus crack) since autocomplete was broken.


Long ago most password managers started ignoring autocomplete=off, and now the browsers are starting to do the same for username/password inputs only.


Unfortunately, bugs in the autocomplete implementations insert username and/or password info into inappropriate form fields, causing form validation errors, or worse yet, accidentally inserting usernames into fields that were intentionally left blank by the user.


What's a web developer to do?


If you can keep all password fields on a page by themselves, that's a great start as it seems that the presence of a password field is the main trigger for user/pass autocomplete to kick in. Otherwise, read the tips below.

Safari notices that there are 2 password fields and disables autocomplete in this case, assuming it must be a change password form, not a login form. So just be sure to use 2 password fields (new and confirm new) for any forms where you allow

Chrome 34, unfortunately, will try to autofill fields with user/pass whenever it sees a password field. This is quite a bad bug that hopefully, they will change the Safari behavior. However, adding this to the top of your form seems to disable the password autofill:

  • <input type="text" style="display:none">

    <input type="password" style="display:none">
Before

After







Thank you for sharing Your Knowledge with others who need It.-Team LetML

Post a Comment

Copyright © LetML. Blogger Templates Designed by OddThemes