Force browser to remember login credentials

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.

There’s a lot of discussion about this on Stack Overflow:

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.

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.

An update from 2024. Today this is not an issue if you build your form input with input="password" and then any submission of the form should get the browser to prompt user to save the password.

I have looked into this question as part of my help desk series, if you like what I’m doing please sponsor me.