Skip to content Skip to sidebar Skip to footer

Autocomplete = 'off' Is Not Working On Firefox

I created 2 login pages of same domain. www.example.com/login.cfm www.example.com/newLogin.cfm I put the form name different for 2 forms with in these two page. Also I put autoco

Solution 1:

This is the cleanest solution I have found to keep Firefox from auto completing.

<!-- The text and password here are to prevent FF from auto filling my login credentials because it ignores autocomplete="off"--><inputtype="text"style="display:none"><inputtype="password"style="display:none">

Add this code snip-it above your input of type password.

As far as I can tell Firefox is looking for an input of type Password, and filling in the password and then adding the username to the input of type text above it. Without a name or an id the inputs don't get added to the post, but this is still a hack.

Solution 2:

$("#CVV").on("focusout", function() {
    if ($(this).val() == "") {  
      $(this).attr("type", "text");
    }   
});
<inputtype="text"name="username"class="input"ID="CVV"onfocus="removeErr('CVV'); $(this).attr('type', 'password');">

Solution 3:

You all should try this attribute :

<input type="password" autocomplete="new-password" />

If you are defining a user management page where a user can specify a new password for another person, and therefore you want to prevent autofilling of password fields, you can use autocomplete="new-password".

See the documentation there : https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Preventing_autofilling_with_autocompletenew-password

Solution 4:

Firefox version 61 this seems to be enough to disable autocomplete in forms:

<inputtype="password" hidden />

All inputs after this one at the top of the form are ignored.

Solution 5:

This is working for me:

<inputtype="text" name="username" value=" " onclick="if(this.value == ' ') this.value=''" >

Click here for more info about this.

Post a Comment for "Autocomplete = 'off' Is Not Working On Firefox"