禁用Safari 7.0.2密钥链密码保存(Disable Safari 7.0.2 keychain password save)

编程入门 行业动态 更新时间:2024-10-22 18:41:32
禁用Safari 7.0.2密钥链密码保存(Disable Safari 7.0.2 keychain password save)

如何禁用safari从使用html或javascript保存表单的用户/传递? 我有这个问题,想出了safari 7.0.2,你可以将用户/传递保存到钥匙串,当你转到同一个表格时,它会自动覆盖这些字段吗? 我个人认为这是一种可怕的行为。 我不认为应该覆盖领域。

我已经创建了一个隔离版本,你可以在这里演示这个问题。 http://dev.davidsalazar.com/issues/safari-autofill/

复制步骤(确保使用最新的safari 7.0.2)

键入和用户/通过单击保存。 它应该提示您保存到钥匙串,接受保存。 现在点击链接加载随机数据,你会发现safari现在将覆盖那些带有你以前保存的字段的字段。

How can I disable safari from saving a user/pass from a form using html or javascript? I've had this issue that came up with safari 7.0.2 where you can save a user/pass to a keychain and when you goto that same form it automatically overrides those fields? Personally I think this is horrible behavior. I don't think fields should ever be overridden.

I've created an isolated version that you can demo the issue here. http://dev.davidsalazar.com/issues/safari-autofill/

Steps to replicate (ensure you use latest safari 7.0.2)

Type and user/pass click save. It should prompt you to save to keychain, accept the save. Now click on the link load random data and you will notice that safari will now be overriding those fields with your perviously saved fields.

最满意答案

解决方法:创建另一个(假的)密码字段,Safari可能会被它弄糊涂 - 在这种情况下,自动填充将被“禁用”

在Safari 7.0.2和7.0.3中测试

演示(带红色假密码): http : //js.pejsa.info/~jam/safari-autofill/

<form method="post" autocomplete="off"> <input type="text" name="username" id="username" value="abc" /> <input type="password" name="password" id="password" value="def" /> <input type="submit" name="submit_btn" value="Save" /> <input type="password" id="fakePassword" style="border:0;width:10px;height:10px;background-color:red;" /> </form>

Workaround: create another (fake) password field and Safari is probably confused by it - autofill will be "disabled" in this case

tested in Safari 7.0.2 and 7.0.3

demo (with red fake password): http://js.pejsa.info/~jam/safari-autofill/

<form method="post" autocomplete="off"> <input type="text" name="username" id="username" value="abc" /> <input type="password" name="password" id="password" value="def" /> <input type="submit" name="submit_btn" value="Save" /> <input type="password" id="fakePassword" style="border:0;width:10px;height:10px;background-color:red;" /> </form>

更多推荐

safari,保存,fields,覆盖,user,电脑培训,计算机培训,IT培训"/> <meta name="desc

本文发布于:2023-07-31 01:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340481.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密钥   密码   Safari   save   password

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!