1

In the chrome browser if I saved the username and password for the website while login then in the whole website wherever it found Username and Password field and those fields are empty then by default it assigns the Saved username and password for those fields.

I tried with autocomplete='off' and also rename those field names as txtUN instead of txtUserName and txtPass instead of txtPassword but it didn't work. enter image description here

So how to prevent the auto fill the username and Password field? Can anyone help?

Thanks

Chitta
  • 185
  • 2
  • 15
  • Autocomplete='off' is not working anymore. Check out post there http://stackoverflow.com/questions/15738259/disabling-chrome-autofill – Adam Kosmala Sep 04 '15 at 13:37
  • Yes, in the modern browsers autocomplete is no more supported, but still i tried :) – Chitta Sep 04 '15 at 13:42

3 Answers3

2

Check the answer from mike nelson in this article

Disabling Chrome Autofill

Updated Solution

Chrome now ignores . Therefore my original workaround (which I had deleted) is now all the rage.

Simply create a couple of fields and make them hidden with "display:none". Example:

<!-- fake fields are a workaround for chrome autofill getting the wrong fields -->
<input style="display:none" type="text" name="fakeusernameremembered"/>
<input style="display:none" type="password" name="fakepasswordremembered"/>
Community
  • 1
  • 1
Tony Wu
  • 1,040
  • 18
  • 28
0

Try logging out and relogging in your Google/gmail account to get an option for auto fill else check your privacy settings in preferences.

Omi Harjani
  • 737
  • 1
  • 8
  • 20
-1

$(document).ready(function () { debugger

        $('input[autocomplete="off"]').each(function () {
            debugger
            var input = this;
            var name = $(input).attr('name');
            var id = $(input).attr('id');

            $(input).removeAttr('name');
            $(input).removeAttr('id');

            setTimeout(function () {
                debugger
                $(input).attr('name', name);
                $(input).attr('id', id);
            }, 1);
        });
    });

Before this put autocomplete="off" for each field you want to.