How to disable Chrome Pop-UP to save passwords?

Asked

Viewed 590 times

6

What would be a method to disable the Pop-Up:

Want Google Chrome to update your password to this site?

inserir a descrição da imagem aqui

Feel free to choose language, but answer with JavaScript will be the answer accepted.

Nota: AutoComplete='Off' indicates to the browser that it is not necessary to display options based on previous values, so that is not what I want.

  • 1

    See related English: https://stackoverflow.com/questions/23177225/how-do-i-disable-the-save-password-bubble-in-chrome-using-javascript

  • Who negatively could explain why? So I could improve the question.

  • 1

    @Wallacemaxters through the link I managed to get the answer! Vlw :)

  • Now there are two negatives. It seems that there is a little galley who did not like the question, but can not explain well what happened.

  • It seems so, will understand =D;

  • 1

    already understood. It must be because you yourself answered, but the guys do not know that the system of the site encourages it :p

  • May I ask why you wish to do this? I cannot visualize an environment where the philosophy of the password store browser might conflict with the application.

  • @Andersoncarloswoss can. I’m creating a Redefinir Senha and when the form is submitted Crome is asking this kind of question.

  • @Marconi but it is not interesting that he does this not to keep the old password stored instead of the new?

  • @Andersoncarloswoss in my case not, even because this user that is in print is not what I am changing the password.

  • @Andersoncarloswoss it created a certain confusion in Ester here, and she thought it best to withdraw.

Show 6 more comments

2 answers

5


For commenting from @Wallace Maxters, I discovered that nowhere does it say exactly how to disable this Pop-UP(in the right ways), but there are ways to circumvent this.

Why does that happen?

Whenever a form with <input type="password"> is sent the Chrome will ask the question of Pop-UP.

And what’s the solution to that?

Add 2 false fields next to your password field.

<input type="password" class="stealthy" tabindex="-1">
<input type="password" " id="user_password" autocomplete="off">
<input type="password" class="stealthy" tabindex="-1">

And use the following CSS

.stealthy {
  left: 0;
  margin: 0;
  max-height: 1px;
  max-width: 1px;
  opacity: 0;
  outline: none;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  z-index: -1;
}

The reason of the class CSS is makes the fields invisible and declassified.

  • This does not make the field characters visible?

  • @Renan edited, this answer solved my problem. Thank you for mentioning here ;)

  • 1

    This answer is not yet definitive. The developers of the main have made the decision to force the local storage of passwords and techniques like this will eventually stop working in some future update. The solution you put here is not the first and will not be the last way to prevent Chrome from saving passwords, it’s just the way it works today.

1

We cannot disable this function directly via Javascript, as this is a config of the browser itself. But we can use a code to "bypass" this ...

You can try copying the password to an 'Hidden' field and removing it from the original input before sending 'Submit'; Example :

function executeAdjustment(){       
    $("#vPassword").val($("#txtPassword").val());
    $(":password").remove();        
    var myForm = document.getElementById("createServerForm");
    myForm.action = "executeCreditAdjustment.do";
    myForm.submit();
}

Ref. Stack

Browser other questions tagged

You are not signed in. Login or sign up in order to post.