Codeigniter中的浏览器缓存问题 [英] Browser Cache issue in codeigniter

查看:59
本文介绍了Codeigniter中的浏览器缓存问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是代码点火器的新手,我创建了一个登录表单和一个注销部分.当我按注销部分时,页面将重定向到登录部分.当我单击浏览器中的后退"按钮时,它将显示前几页.当我单击清除最近的历史记录"和选择缓存",然后按后退"按钮时,将不显示最近的页面.它仅显示登录部分.如何克服这个问题?请帮助我...

I am new in code igniter.I created a login form and a logout section. When i press the logout section, the page will redirect to login section. And when i click the back button in the browser it will show the previous pages.When i click the clear recent history and the choose cache,and then press the back button, it will not show the recent pages.It only shows the login section. How to overcome this?Please help me...

推荐答案

在.htaccess文件中,添加以下行:

In the .htaccess file please add the lines:

<IfModule mod_headers.c>
Header add Cache-Control:  "no-store, no-cache, must-revalidate"
</IfModule>

此.htaccess文件应位于应用程序文件夹的外部.因此,如果您注销自己的网站,即如果您破坏了所有会话,则商店中将不会存储任何数据.因此,通过点击

this .htaccess file should be out side of the application folder. So if you logout your site i.e. if you destroy all the session then no data be stored in the store. So by clicking the back button in the

这篇关于Codeigniter中的浏览器缓存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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