Force browser to remember login credentials


#1

Hey guys!

How do you force browser to ask to save the password in login forms?
Mine does not ask an I am not sure where to look for.
Since I’m using DDP login, form is never submitted.


#2

There’s a lot of discussion about this on Stack Overflow: http://stackoverflow.com/questions/2382329/how-can-i-get-browser-to-prompt-to-save-password

It looks like most browsers only offer to save the password if the form is actually submitted with HTTP - some people are suggesting tricks like having the form target a hidden iframe.


#3

The proposed solution should work, however keep in mind, that lots of users are using ENTER key (or GO on mobile) to submit the form and since the solution proposes to prevent default on the form submit event, the enter/go key is going to do nothing. Although you can check the submit event for enter/go keycode and keep the logic while submiting the form, however that would bring you again to the begging of the problem.

There is a little different solution, if you really need this use location.reload() which will reload the active window and prompts the user to save the password.