First, you should remember that Chrome password autofill is a feature, not an annoying thing that Chrome put in. Also, most users actually like this feature. Instead of having to recall their really long password, and then hopefully put it in correctly, and hope it doesn't say "incorrect password". The idea of Chrome password saving is so it keeps your passwords safe (ironically). But if a hacker manages to get into your browser, then using the password autofill, they can get into all of your passwords. And if you reset your password, the Chrome password autofill can be very annoying. And because of the password autofill, No solution using <input type="password">
will work, exception for autocomplete="new-password"
.
But don't worry, as there are ways to work around this.
Use text input and CSS
The best way to disable autocomplete is to just use the standard <input type="text">
. And to hide the password, just add a line of CSS. Here is a working example.
input {
-webkit-text-security: disc
}
<input autocomplete="off">
Note that the -webkit
is required. Read the docs here