If you’re the type of person that always allows Firefox to save your login credentials for the sites you visit, you might be very frustrated when you come across a site that doesn’t even prompt you to save the credentials. We’ve got the lowdown on what’s going on here.
如果您是始终允许Firefox为您访问的网站保存登录凭据的人员,那么当您遇到一个甚至没有提示您保存凭据的站点时,您可能会感到非常沮丧。 我们对这里发生的事情感到失望。
Here’s that awful form I have to type into almost every day… I’m really getting tired of it.
这几乎是我每天都要键入的可怕表格……我真的对它感到厌倦。
![image](https://i-blog.csdnimg.cn/blog_migrate/1d7867c351aeda2c48f7231c3c115321.png)
So I take a look into the source for the page, and here’s the culprit: the AUTOCOMPLETE=”off” on the form will tell Firefox to disable auto completing for that form. The form elements themselves also have the same tag on them.
因此,我看了看页面的源代码,这是罪魁祸首:表单上的AUTOCOMPLETE =“ off”将告诉Firefox禁用该表单的自动完成功能。 表单元素本身也具有相同的标签。
![image](https://i-blog.csdnimg.cn/blog_migrate/f66a49c2de64c99eec28811c12a1593d.png)
You’ll find this happens quite often on corporate vpns, banks, and other sites where they are worried about security and don’t want you to save your passwords, so they use this tag in their pages to prevent your browser from saving the credentials.
您会发现这种情况经常发生在企业vpn,银行和其他担心安全性并且不希望您保存密码的站点上,因此他们在页面中使用此标记来防止您的浏览器保存凭据。
Your Best Option: Greasemonkey it!
您最好的选择:Greasemonkey!
You can use a greasemonkey script to re-enable the autocomplete on the form elements. You can find a number of them at userscripts.org:
您可以使用lublessmonkey脚本在表单元素上重新启用自动完成功能。 您可以在userscripts.org上找到其中的一些:
http://userscripts-mirror.org/
http://userscripts-mirror.org/
Or you can write your own if you feel like it… for some reason the other scripts did not work on my screwy corporate vpn at work, so I created a new script that manually set the attributes of each.
或者,您也可以编写自己的脚本……由于某种原因,其他脚本无法在我工作的繁琐公司vpn上运行,因此我创建了一个新脚本来手动设置每个脚本的属性。
var frm = document.forms[0]; frm.setAttribute(‘autocomplete’, ‘on’); frm.elements[0].setAttribute(‘autocomplete’, ‘on’); frm.elements[1].setAttribute(‘autocomplete’, ‘on’);
var frm = document.forms [0]; frm.setAttribute('autocomplete','on'); frm.elements [0] .setAttribute('autocomplete','on'); frm.elements [1] .setAttribute('autocomplete','on');
Hint: the Firebug extension is a great way to figure out what the elements are if you are writing a script.
提示: Firebug扩展是在编写脚本时弄清楚元素是什么的好方法。
翻译自: https://www.howtogeek.com/howto/internet/firefox/why-doesnt-autocomplete-always-work-in-firefox/