Possible Duplicate:
Disable b开发者_如何学编程rowser '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.
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.
using javascript...
document.getElementById('usernameOrWhatever').setAttribute( 'autocomplete', 'off' )
精彩评论