4

I'm creating an Angular application with Devextreme components. The question is that I don't want that in my Login screen when I enter the username and password the browser suggests me to save the password: enter image description here

I would like to know if from my angular application there is a way to make this not happen and that this solution will work for some of the browsers. I would also like to know a solution to prevent the password fields from suggesting passwords as shown below:

enter image description here

At the moment I have tried adding the following parameters to my text components:

autocomplete="off"
autocomplete="new-password"
autocomplete="chrome-off"

The autocomplete="new-password" option works fine for me so that it does not autocomplete the fields when I have the password saved in the browser. But it still suggests me what I have shown in the two images above.

I hope someone can help. Thank you very much!

Stella Esparza
  • 101
  • 1
  • 9
  • I would agree with this answer https://stackoverflow.com/a/35244490/616535 that it is not a really good practice to try to prevent a browser on HTML/JavaScript level from prompting to save a password. If you're really need it probably there is a way to disable it on browser level settings. – Andrey Etumyan Mar 17 '22 at 09:12
  • Please have a look at this as well, https://stackoverflow.com/questions/32775342/how-to-disable-chromes-saved-password-prompt-setting-through-javascript and the this to check which browsers are supported https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-security – Sydney_dev Nov 04 '22 at 08:35

0 Answers0