dounangshen6553
2015-10-07 07:43
浏览 82

如何在Codeigniter中禁用cookie和缓存

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.

Save Password

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.

One Form

How do I get rid of the username and password? I am using Codeigniter.

图片转代码服务由CSDN问答提供 功能建议

我遇到有关缓存和Cookie以及Codeigniter的问题。

当我使用用户名和密码登录时,会出现这样的提示。

“保存密码”

然后单击保存密码。 之后我有一个表单,其中还有用户名和密码字段。 这些字段将自动填入我从之前的应用程序登录中输入的用户名和密码。

如何摆脱用户名和密码? 我正在使用Codeigniter。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douxiongye5779 2015-10-07 08:46
    已采纳

    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.

    theory test

    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.

    kludgy soln

    点赞 打赏 评论

相关推荐 更多相似问题