Live data from Hacker News

Stop Password Masking

useit.com

81–83 of 83 posts

Re: Stop Password Masking

#81
My concern is that not using a standard HTML password field will break the 'remember password' functionality built into browsers.

When you log in to a site, all the major browsers automatically ask you if you want to save your password. But if you display the password in plain text then the browser doesn't detect it as a password... and it doesn't offer to save it for you.

So what is that likely to result in? • Users getting annoyed at your site, and thus lost business • Users writing down their password somewhere else, resulting in a loss of security

These outcomes are exactly the opposite of what Jakob Nielsen is trying to achieve!

Re: Stop Password Masking

#82

Combine this with the "remember password" feature of most browsers, and you have a real problem.

Actually, no. This is the primary problem with this idea. Browsers use as the tip-off to know there is a password to remember here. If the input field isn't a "password" type, the browser won't remember the password for you.

Re: Stop Password Masking

#83
post #75

Just put a "show password" checkbox next to it and use javascript to change the input field type from password to text.

Yeah, that'd probably be a one-liner JavaScript. Something like: onclick="getElementById('pwd').type='text';" But you'd want a bit more to toggle it. Still, maybe a slightly better way -- and a way to address the security issue at the same time -- would be to show the password when you hover over the field with your mouse. Is there a way to do this easily with JS?

You can do it in jQuery very easily. Give your password field the id of "hover-password" and add the following jQuery snippet:

  $(function() {
    $("#hover-password").hover(
      function() {
        this.type = "text";
      },
      function() {
        this.type = "password";
      }
    );
  });
Post reply on HN