开发者

CodeIgniter session issue on Opera and Safari

I a开发者_开发知识库m using codeigniter 1.7.2.

In my web app after logging out, on clicking the back button of the browser the page is reloaded in the logged in page.

This issue is occuring on Opera and Safari only. I have disabled cache using meta, but that doesn't help. :(

<meta http-equiv="PRAGMA" content="NO-STORE" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="CACHE-CONTROL" content="NO-STORE" />

Please help..


Can you show how you disabled cache using meta?

Browsers use a separate caching-mechanism for browser history. Even if you disabled the cache a browser may still store a page for the browser history. The Cache-Control: no-store header should prevent storing pages at all. The best way to send this header is using PHP instead of relying on meta-elements:

header("Cache-Control: no-store");

Also see: What is Cacheable for the difference between Cache-Control: no-cache and Cache-Control: no-store

Update: This doesn't work in Opera, it works at least in Firefox and Chrome.


Short answer: the only way to prevent Opera from using cache on history navigation (back/forward button) is to serve the page over https with Cache-control: must-revalidate header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜