如何停止密码的自动完成选项 [英] How to stop Auto complete option for Password

查看:136
本文介绍了如何停止密码的自动完成选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在使用MVC Razor View,现在我想停止密码字段的自动完成选项。到目前为止,我使用的是autocomplete =off,但没有在crome中工作。



有谁可以帮我这个?

解决方案

我通过谷歌搜索禁用密码自动完成找到了两个有希望解决这个问题的方法



如何关闭表格自动完成 - 网络安全| MDN [ ^ ]

html - 禁用Chrome自动填充 - 堆栈溢出 [ ^ ]



如果这些都不适合您,您可以通过查看Google的其他搜索结果找到其他方法。


感谢大家的帮助。 :) :)

但是我得到了我想与你分享的解决方案。

只需创建一个像FakePassword这样的虚假属性并使其成为样式显示无。< br $> b $ b

会发生什么,浏览器会首先点击@ Html.PasswordFor,所以它不会影响真正的




感谢您的合作。 :)


看看:如何在Web表单字段/输入标记上禁用浏览器自动填充?



引用:





Firefox 30忽略密码的autocomplete =off,选择提示用户是否密码应存储在客户端上。请注意2014年5月5日的以下评论:



密码管理器始终提示是否要保存密码。未经用户许可,密码不会保存。

我们是第三个在IE和Chrome之后实现此更改的浏览器。



依据在Mozilla开发人员文档中,表单元素属性autocomplete防止表单数据在旧浏览器中缓存:





 <  输入    type   =  text   名称  =  foo    autocomplete   =  off    /  >  


Hello,
I am using a MVC Razor View , now i would like to stop Auto complete option for Password Field. So far i am using autocomplete="off" but not working in crome.

Can anyone please help me on this ?

解决方案

I found two promising approaches to that problem by googling for "disable autocomplete for password":

How to Turn Off Form Autocompletion - Web security | MDN[^]
html - Disabling Chrome Autofill - Stack Overflow[^]

If none of these work for you you might find other ways by looking at the other search results from Google.


Thanks everyone for your help. :) :)
But i got my solution that i would like to share with you.
Just create a fake Property like FakePassword & make this a style display None.

What will happen, browser will hit first @Html.PasswordFor , so it will not
affect the real one.

Thanks for your co-operation. :)


Take a look: How do you disable browser Autocomplete on web form field / input tag?

Quote:



Firefox 30 ignores autocomplete="off" for passwords, opting to prompt the user instead whether the password should be stored on the client. Note the following commentary from May 5, 2014:

The password manager always prompts if it wants to save a password. Passwords are not saved without permission from the user.
We are the third browser to implement this change, after IE and Chrome.

According to Mozilla developer documentation the form element attribute autocomplete prevents form data from being cached in older browsers:



<input type="text" name="foo" autocomplete="off" />


这篇关于如何停止密码的自动完成选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆