autocomplete = 'off' is not working on firefox

后端 未结 17 1734
無奈伤痛
無奈伤痛 2020-12-17 09:25

I created 2 login pages of same domain.

  1. www.example.com/login.cfm
  2. www.example.com/newLogin.cfm

I put the form name different for 2 forms

相关标签:
17条回答
  • 2020-12-17 09:43

    Just put a random value in autocomplete.

    <input autocomplete = "!!1337!!">
    
    0 讨论(0)
  • 2020-12-17 09:44

    $("#CVV").on("focusout", function() {
        if ($(this).val() == "") {  
          $(this).attr("type", "text");
        }   
    });
    
    <input type="text" name="username" class="input" ID="CVV" onfocus="removeErr('CVV'); $(this).attr('type', 'password');">
    
    0 讨论(0)
  • 2020-12-17 09:44

    https://bugzilla.mozilla.org/show_bug.cgi?id=956906

    http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0015.html

    Autocomplete has been disabled for password type input fields. The above links mention that respectively for FireFox and IE, but I see that setting autocomplete to off for form too is not working.

    0 讨论(0)
  • 2020-12-17 09:45

    You all should try this attribute :

    <input type="password" 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

    0 讨论(0)
  • 2020-12-17 09:45

    Nothing worked for me for the password field so I'll share my trick

    <input name="password" type="text" onkeydown="this.type='password'">
    

    I believe it is still secure and works on Chrome, Firefox, other

    0 讨论(0)
  • 2020-12-17 09:46

    This is working for me:

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

    Click here for more info about this.

    0 讨论(0)
提交回复
热议问题