How do browser not save login and password when it is not a login form?

Asked

Viewed 65 times

1

I have a registration confirmation page that is where the user creates his password and some other information. One of these other information is the phone, which comes just before the password field.

The browsers were automatically filling in the phone field with already saved logins and the password field with the respective password for that login, and also asking if I wanted to save that information, again with the phone in place of the login. I was able to fix Autofill using autocomplete="new-password" in the password field, but contrary to what I imagined this did not fix the second problem.

After that I remembered that the telephone field was with autocomplete=off, and just to test I decided to take. This ended up solving the second problem in Chrome (I don’t know why), but in Firefox.

Any solution or explanation?

  • autocomplete accepts value only off or on

  • i usually put a Hidden password field before the real one (when you have more than one, you have a browser that disables Autofill), and randomize the "name"

  • @Ivcs autocomplete accepts some values other than on and off https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autocomplete

  • @Thanks for the tip, but I didn’t want to do this because I think it seems like a scam. I can’t believe there’s no "right" way to do this

  • 1

    In time you will realize that to do something nice for the web needs about 30% of gambiarra. The committees that regulate these things are from theorists of a thousand other branches, so CSS and JS are so poorly designed, and XHTML lost pro HTML in choosing future patterns. Committee usually has too much chief for too little Indian. That’s why even the market insisting, well-made desktop systems are always far superior to well-made web systems. I bet that in the next 5 to 10 years it will continue to be. 8 years ago I talked about it, and they said I was out. Today I laugh at them :)

  • In other words, I know how you feel about something so simple not having an obvious solution. I feel like this all the time when I do stuff for the web, and I could tell you a list of them, actually. But I think it’s great that you’re looking for a "right" path. Be prepared not to find it, but never stop looking. Round and a half the guys give one inside and improve something over time.

  • Yes, it’s very sad not to have a simple solution to such small problems. But with the increasingly participatory developer community maybe this will change one day. I hope that yes haha

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.