4

What do you need to do on a login form so that the browser prompts to remember the login information? I have a input named "username" and one named "password".

on my browser i have it set to ask if it should remember the password, and it does on most sites, but on the site that i am testing it doesnt, so i am wondering what can be changed to make it remember.

i am also using the type=password for the password field, and it logs in fine and everything, but neither firefox, or safari want to remember it. it is not a huge problem, but it would be nice to figure out

Thanks

here is the form:

<form id="login" method="post" action="/login.php">
<div class="cell">

<div class="left">Username: </div>
<div class="right">
<input type="text" id="username" name="username"> 
</div>

<div class="left">Password: </div>
<div class="right">
<input type="password" id="password" name="password">
gtsatars
  • 57
  • 9
blah
  • 239
  • 1
  • 4
  • 9

3 Answers3

4

Make sure your input is type="password". If its type is text, it won't work.

Brendan Long
  • 53,280
  • 21
  • 146
  • 188
  • Exactly. It doesn't matter what the fields are called, as long as one of them is a password field it'll trigger the remember-password prompt (at least in FF). – Chris Van Opstal Apr 05 '10 at 19:02
  • I have an input of type password in my website and firefox never asks me either. My site is still under construction though, so when you login, the next request still shows the login form, and then the request after it will figure out that your logged in and not display the form. Maybe if the form is shown after trying to login has something to do with it? (firefox detects it as a "wrong password" and so won't try to remember it) – Earlz Apr 05 '10 at 19:25
  • @Earlz, it sounds like whatever function is telling it that you're logged in is happening after the form is displayed. – Brendan Long Apr 05 '10 at 19:53
  • Well, yea, that's part of the WIP bit. lol. – Earlz Apr 05 '10 at 22:03
1

Usualy nothing... Browser take care of that. There is a attribute in HTML to tell browser NOT to remember

autocomplete=off
confiq
  • 2,795
  • 1
  • 26
  • 43
  • He *wants* the browser to remember them, read the question more carefully. – animuson Apr 05 '10 at 19:02
  • 1
    on my browser i have it set to ask if it should remember the password, and it does on most sites, but on the site that i am testing it doesnt, so i am wondering what can be changed to make it remember. – blah Apr 05 '10 at 19:02
  • 2
    I did read it, and answer it in first 2 words! – confiq Apr 05 '10 at 19:03
  • @animuson: read his answer more carefully. He did answer the question...and then provided some extra detail which, while tangential, could still be useful. – Beska Apr 05 '10 at 19:04
  • @milesmibaleer: Good info! Add that to your question...it helps! – Beska Apr 05 '10 at 19:05
  • "Usually nothing" does not answer the question. There are things you have to do to get the browser to send the prompt, as explained in the accepted answer of the question I linked to. While they may be simple tasks to accomplish, they are things that must be done. – animuson Apr 05 '10 at 19:12
  • But password inputs 'always' should have type=password. It's obvious. anyway, doesn't matter, if answer was not useful for you then leave your vote that way! – confiq Apr 05 '10 at 19:27
  • And as you see in his edited question, there is type=password ... blah... – confiq Apr 05 '10 at 19:28
  • autocomplete is ignored these days (2015), at least in Chrome: https://groups.google.com/a/chromium.org/d/msg/security-dev/wYGThW5WRrE/frLqVUD4OqIJ – mhenry1384 Mar 19 '15 at 20:37
0

Firefox (I don't use the others, but I assume it mostly applies) will remember what you enter in any field of any form. Passwords are special probably because the field is marked as type="password" so Firefox will (by default) ask if you want to remember the credentials. If you select "Never ask again" it will never ask again, which might be what you're seeing. It stores this information per page and there's a setting somewhere which allows you to reset this, of course.

Tomislav Nakic-Alfirevic
  • 10,017
  • 5
  • 38
  • 51