10

I've noticed on bank websites, etc, my user IDs aren't saved (they don't appear in a dropdown like other commonly entered stuff does) and there's no prompt for it to remember your password. How is this done? How do the sites notify the browser that they are in 'special' or else exceptions? Just curious.

victoriah
  • 1,394
  • 3
  • 11
  • 24
  • 1
    Ugh, as a user, I hate this. I know it is more or less insecure, depending on how I secured my computer, but please let *me* decide how much convenience I want. – winsmith May 13 '11 at 19:06

4 Answers4

8

Usually you just need to put the autocomplete="off" into the form or field you want to block.

Keep in mind that users can get around this with a scriptlet, plugin, or grease-monkey script.

https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion#Exceptions_and_Recommended_Workarounds

http://msdn.microsoft.com/en-us/library/ms533032(VS.85).aspx

Zoredache
  • 31,819
  • 7
  • 40
  • 59
6

Set autocomplete to off:

<input type="password" autocomplete="off" />

See also this question: Disable browser 'Save Password' functionality

Community
  • 1
  • 1
Robert Gamble
  • 97,930
  • 23
  • 141
  • 137
0

Autocomplete behavior can be controlled at TextBox also.

As suggested in link below, use AutoCompleteType = "Disabled" to disable autocomplete for any textbox.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.autocompletetype.aspx

BinaryHacker
  • 392
  • 3
  • 11
0
      $(document).ready(function () {  $('input[autocomplete="off"]').each(function () {

            var input = this;
            var name = $(input).attr('name');
            var id = $(input).attr('id');

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

            setTimeout(function () {

                $(input).attr('name', name);
                $(input).attr('id', id);
            }, 1);
        });
    });
  • Please consider editing your post to add more explanation about what your code does and why it will solve the problem. An answer that mostly just contains code (even if it's working) usually wont help the OP to understand their problem. – SuperBiasedMan Sep 30 '15 at 08:54