禁用 Google Chrome 自动完成/自动填充/建议 [英] Disable Google Chrome Autocomplete / Autofill / Suggestion

查看:46
本文介绍了禁用 Google Chrome 自动完成/自动填充/建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想禁用谷歌浏览器自动完成/自动填充/使用密码建议
与 autocomplete="off" 类似的东西(这个不起作用).

I want to disable google chrome autocomplete / autofill / use password suggestion
Something similar with autocomplete="off" (this one is not working).

代码如下

loginpage.php

<form class="form-method" method="post">
    <span class="form-fill">
      <text>Username</text>
      <input placeholder="Username" required/>
      <text>Password</text>
      <input type="password" placeholder="Password" required/>
      <button type="submit"></button>
    </span>
</form>

anotherform.php

<form method="REQUEST" class="vp-method">
    <input type="password" maxlength="4" autocomplete="JUST STOP!"/>
    <button type="submit" placeholder="DVN Number">Validate</button>
</form>


如何在不使用 javascript 的情况下禁用此 google chrome 自动完成/建议/自动填充?

How to disable this google chrome autocomplete / suggestion / autofill WITHOUT using javascript?

注意:我知道重复问题.而且这些建议都不起作用(因为我现在正在打字).

Note : I'm aware of duplicating question. And none of those suggestion is working (as I'm typing right now).

谢谢:)

推荐答案

Chrome 不再支持 autocomplete="off".请改用 autocomplete="new-password".
Mozilla 链接

Chrome no longer supports autocomplete="off". Use autocomplete="new-password"instead.
Mozilla link

来自文档:

因此,许多现代浏览器不支持autocomplete="off" 用于登录字段:

For this reason, many modern browsers do not support autocomplete="off" for login fields:

如果站点为用户名和密码输入字段设置了 autocomplete="off",那么浏览器仍然会记住这个登录,如果用户同意,浏览器将在下一次自动填充这些字段用户访问页面.这是 Firefox 中的行为(自版本38)、Google Chrome(自 34 起)和 Internet Explorer(自版本起)11).

If a site sets autocomplete="off" for 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 the page. This is the behavior in Firefox (since version 38), Google Chrome (since 34), and Internet Explorer (since version 11).

如果作者想阻止自动填充密码字段在用户管理页面中,用户可以在其中指定新密码不是他们自己的人,autocomplete="new-password" 应该是指定,虽然对此的支持尚未全部实现浏览器.

If an author would like to prevent the autofilling of password fields in user management pages where a user can specify a new password for someone other than themself, autocomplete="new-password" should be specified, though support for this has not been implemented in all browsers yet.

另一种解决方案是使用 autocomplete="false".以下是一些可能有帮助的其他 SO 问题的链接:

Another solution is using autocomplete="false". Here are a few links to other SO questions that may help:

SO - 禁用 Chrome 自动填充

SO - Chrome 浏览器忽略 AutoComplete=Off

SO - Chrome 63+ 自动完成绕过

这篇关于禁用 Google Chrome 自动完成/自动填充/建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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