如何在Codeigniter中禁用Cookie和缓存 [英] How to disable cookies and cache in Codeigniter
问题描述
我在缓存,cookie和Codeigniter方面遇到问题。
当我使用用户名和密码登录时,会出现类似这样的提示。
然后单击保存密码
。之后,我有一种形式,其中也有用户名和密码字段。这些字段将自动填充我从上一个应用程序登录名输入的用户名和密码。
如何删除用户名和密码?我正在使用Codeigniter。
我发现了
在寻找解决方案时,我发现
I am facing a problem regarding the cache and cookies and Codeigniter.
When I log in using a username and a password, there is a prompt like this.
I then click Save Password
. After that I have one form where there are also username and password fields. These fields become automatically filled with the username and password that I have entered from the previous application login.
How do I get rid of the username and password? I am using Codeigniter.
I found this that presents a theory. I quote:
If the browser detects <input type="password">, it will assume that the <input type="text"> IMMEDIATELY in front of it is the username input.
With some testing myself, I found this to be true.
In searching for solutions I found this one.
Specifically:
Simply create a couple of fields and make them hidden with "display:none". Example:
<!-- fake fields are a workaround for chrome autofill getting the wrong fields -->
<input style="display:none" type="text" name="fakeusernameremembered"/>
<input style="display:none" type="password" name="fakepasswordremembered"/>
This is a kludgy solution. However it works.
这篇关于如何在Codeigniter中禁用Cookie和缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!