How to prevent Chrome from requesting credit card information

I’m trying to find a way to programmatically disable the Chrome prompt "You want to save this credit card information."

I tried to add autocomplete="off" to all inputs as well as to the form, but this hint still appears.

Is there any way to disable this programmatically?

Unfortunately, this is different from disabling the "Save Password" browser function because it all revolves around Chrome cheating, assuming the input field is not a password field / just uses autocomplete="off" , however Chrome no longer confirms autocomplete="off"

This is the banner that I mean:

Do you want chrome to save your credit card information

+5
source share
2 answers

There is a good reason that Chrome ignores autocomplete="off" - this is not your information to decide if the user browser can save it. Thus, intentionally there is no way to programmatically disable this functionality.

You can make Chrome respected autocomplete="off" by setting the appropriate flag in chrome://flags , which will give you the result you want, but this only affects your browser - again, the user information that needs to be resolved, since they see fit.

0
source

What I did was use a hidden field for the credit card number and store the actual credit card number in it, and then clear the actual credit card number from the JScript screen.

+1
source

Source: https://habr.com/ru/post/1216111/


All Articles