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.
Asked
Active
Viewed 2,452 times
4 Answers
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.
http://msdn.microsoft.com/en-us/library/ms533032(VS.85).aspx

Zoredache
- 37,543
- 7
- 45
- 61
6
Set autocomplete to off:
<input type="password" autocomplete="off" />
See also this question: Disable browser 'Save Password' functionality

Community
- 1
- 1

Robert Gamble
- 106,424
- 25
- 145
- 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
- 402
- 4
- 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);
});
});

Shyam Sharma
- 31
- 3
-
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