gpt4 book ai didi

javascript - 防止浏览器记住凭据(密码)

转载 作者:数据小太阳 更新时间:2023-10-29 05:05:34 25 4
gpt4 key购买 nike

是否可以在处理任何登录表单后阻止浏览器提供记住密码的选项?

我知道这里有人问过并回答过,但到目前为止没有一个答案有效,甚至其中一个建议使用:

autocomplete="off"

但这也没有用。

我正在使用 AngularJS 和 Jade 作为模板引擎(不确定是否相关),有什么办法可以做到这一点吗?

最佳答案

if a site sets autocomplete="off" for a form, and the form includes username and password input fields, then the browser will still offer to remember this login, and if the user agrees, the browser will autofill those fields the next time the user visits this page.

https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

您还应该在输入和表单中设置 autocomplete="off"

谷歌浏览器发行说明:

The Google Chrome UI for auto-complete request varies, depending on whether autocomplete is set to off on input elements as well as their form. Specifically, when a form has autocomplete set to off and its input element's autocomplete field is not set, then if the user asks for autofill suggestions for the input element, Chrome might display a message saying "autocomplete has been disabled for this form." On the other hand, if both the form and the input element have autocomplete set to off, the browser will not display that message. For this reason, you should set autocomplete to off for each input that has custom auto-completion.

关于javascript - 防止浏览器记住凭据(密码),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31439047/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com