Here's the scenario: I login to my site, at which point the browser asks me if I would like to save my details, I click yes. Later on I wish to change my password, so I go to the change password page. The browser automatically assumes the 'old password' input box is a login box and puts in the current password. This means all I have to do is type in a new password twice and the password will be changed.
It is easy to see how this is a potential security risk... I have tried a couple methods to override this which were:
- Explicitly setting the input value to blank in HTML.
- Setting autocomplete to off in HTML.
- Using Javascript to set the value to blank (on page load, click, setTimeout).
None of my attempts thus far have worked. So my question is: Is there a cross browser solution that allows a developer to override/specifically declare where passwords should and shouldn't be filled in by the browser?