6

I want to disable password autocomplete dropdown(see screenshot below) that opens when I click password field.Screenshot

This has been frequently asked question. But no solution is working in Chrome Version 61.0.3163.100.

Solutions tried:

autocomplete="new-password" solution was working until few versions ago. It seems chrome has intentionally removed this in latest versions.

Is there any other way to achieve this?

Yuvraj
  • 205
  • 1
  • 10

1 Answers1

0

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

Caleb Liu
  • 627
  • 5
  • 18