Skip to content Skip to sidebar Skip to footer

Autocomplete= Off Not Working In Chrome

We are working on one web application in that one payment page is there. In that we have two Text box one is for Credit Card Number and second one is for Verification Code and it t

Solution 1:

It appears that Chrome now ignores autocomplete="off" unless it is on the <form autocomplete="off"> tag since v34.

you can't cheat by create an hidden input over. Auto complete feature will get the first input text to fill data.

Method 1:

<formid=""method="post"action=""autocomplete="off"><inputtype="text"style="display:none" /><inputtype="password"style="display:none"><asp:textboxautocomplete="off"></form>

So put this before your textbox.

<inputtype="text" style="display:none" />

Method 2:

Change

autocomplete="off"

to

autocomplete="false"

Method 3: Browser autofill in by readonly-mode.

 <input type="password"readonly onfocus="this.removeAttribute('readonly');"/>

Method 4:

For username password combinations. Chrome heuristics looks for the pattern.

<inputtype="text" onfocus="this.type='password'">

Method 5: jQuery

if ($.browser.webkit) {
    $('input[name="password"]').attr('autocomplete', 'off');
    $('input[name="email"]').attr('autocomplete', 'off');
}

Solution 2:

This is the only solution that worked for me with both Autocomplete and Chrome's Autofill: It works also after calling new this.props.google.maps.places.Autocomplete

  1. Add autocomplete="off" on the form tag.

  2. Set autocomplete="none" directly on the input inside the form and set the attribute again on focus.

    <formautocomplete="off"><inputtype="text"autocomplete="none"onfocus="this.setAttribute('autocomplete', 'none');"/></form>

Solution 3:

this is works if you want to keep white as your input background color

<inputtype="password"class="form-control"id="password" name="password" placeholder="Password" readonly onfocus="this.removeAttribute('readonly');" style="background-color: white;">

Solution 4:

use this solution

<inputtype="password"class="form-control auto-complete-off"id="password" name="password" autocomplete="new-password">

Solution 5:

this solution is no longer working in chrome 95 and above,

Try using a normal input with type text, disable copy and pasting then add a style with property -webkit-text-security to add character mask on typing

#Not that this css property is not universal as mentionned here https://developer.mozilla.org/fr/docs/Web/CSS/-webkit-text-security

Post a Comment for "Autocomplete= Off Not Working In Chrome"