3

Possible Duplicate:
Disable browser 'Save Password' functionality

How can you block the remember password prompt in an HTML form? An example is PayPal, which does not allow stored passwords.

I know autocomplete should be off and there is another trick to block the autocomplete when the browser doesn't support the attribute (make a hidden field named password). These two methods do not work in blocking the browser from prompting to store the password however.

Community
  • 1
  • 1
Spechal
  • 2,298
  • 4
  • 26
  • 44

2 Answers2

1

Send auth request using Ajax, then do JavaScript redirect on success.

// in JQuery it would be like this
$.post({
    url: '/login.php', 
    data: 'username=test&pass=test', 
    success: function(data) {
        window.href='success.php'
    }
});

OR

(I haven't tried this yet)

You can clear (or delete from DOM) username & password field before submit, and merge (may be hash as well) them into one hidden field and then do regular post.

On login page you need to reverse engineer that info again.

рüффп
  • 4,475
  • 34
  • 62
  • 99
Ish
  • 24,560
  • 11
  • 57
  • 75
-1

using javascript...

document.getElementById('usernameOrWhatever').setAttribute( 'autocomplete', 'off' )
John K.
  • 5,230
  • 1
  • 18
  • 20