禁用密码缓存的跨浏览器技术 [英] Cross-browser techniques for disabling password caching
问题描述
保存和自动归档用户名/密码是大多数现代浏览器的一项功能.并且用户通常可以选择在每个域的基础上禁用此功能.但是网站本身是否有标准的方法来防止密码缓存?
Saving and auto-filing of username/password is a feature of most modern browsers. And the user can generally choose to disable this feature on a per domain basis. But is there a standard way for the site itself to prevent password caching?
这里的重点是跨浏览器,所以我会在必要时使用多个并行机制.
The emphasis here is cross-browser, so I would employ multiple parallel mechanisms if necessary.
(我已经看到在存在非标准登录字段的情况下有效地禁用缓存,例如,一个额外的隐藏密码字段.但我宁愿不依赖 副作用,其行为可能未来意外改变.)
(I have seen caching be effectively disabled in the presence of non-standard login fields, eg, an extra hidden password field. But I'd rather not depend on side-effects whose behavior could unexpectedly change in the future.)
相反,是否有浏览器/版本在没有任何禁用功能的情况下实现密码缓存?
Conversely, are there browsers/versions out there that implement password caching without any disable feature?
推荐答案
将 autocomplete="off"
添加到您的 元素.适用于所有现代浏览器,IIRC.
Add autocomplete="off"
to your <input>
elements. Works in all modern browsers, IIRC.
这篇关于禁用密码缓存的跨浏览器技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!