Chrome, Safari and Opera do not remember password on simple form
Asked Answered
W

1

3

I first had the problem with an AJAX login, and after looking for a solution for hours I thought I would try something as simple as this:

<html>
    <head></head>
    <body>
        <form id="login_form" action="login.html" method="post">
            <input type="text" id="login_username" value="" />
            <input type="password" id="login_password" value="" />
            <input type="submit" id="login_submit" value="Login" />
        </form>
    </body>
</html>

It goes to login.html but does not offer to save the password! I thought it might be a localhost issue so i deployed on the server and still, Chrome does not offer to store the password. FF and IE work as expected but Chrome, Safari and Opera do not.

"Offer to save passwords I enter on the web" is checked.

"Never saved" is empty.

Wallas answered 7/5, 2013 at 13:55 Comment(0)
W
5

Wow. This should be noted somewhere. I suspect it probably is but I just could not find it...

The solution is the name tag in both username and password fields. If these are missing then Chrome will not offer to save the password. Once I added the name tags Chrome and Opera started to offer to save the password.

Safari is still not doing it.

<html>
  <head></head>
  <body>
    <form id="login_form" action="login.html" method="post">
      <input type="text" id="login_username" name="login_username" value="" />
      <input type="password" id="login_password" name="password_username" value="" />
      <input type="submit" id="login_submit" value="Login" />
    </form>
  </body>
</html>
Wallas answered 7/5, 2013 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.