Welcome Guest, Not a member yet? Register   Sign In
Caching problem
#1

[eluser]pallavi312[/eluser]
Hello
I have developed application in php. When i logout in mozilla on logout link i call function logout() from controller where i cleared my session & redirect to login page.
but in mozilla after logout if i click arrow(recent pages) it shows me my visted pages from application. if i select any page from that list it redirect to me corosponding page. it shouldn't happen. it should redirect me login page.

even i have check on that visted page whether session is set or not, if not set redirect to login page.

Please help me to solve this problem...Its urgent......
#2

[eluser]bigtony[/eluser]
That will be because your browser is caching the page content when you were logged in and is then serving up the cached version later rather than going back to the server. It's a common problem. Do a search on this forum for ways to overcome this (it involves setting meta tags to tell the browser not to cache the page).
#3

[eluser]Colin Williams[/eluser]
The browser is showing you a page from its cache. It's not even hitting your web server. Send no-cache headers on your protected pages.

EDIT: Bah! Beat me to it.
#4

[eluser]pallavi312[/eluser]
hello,
i have set meta in header file but still it gives me same problem. this problem exist in mozilla not in IE.

i have set following line in header file

<meta http-equiv="expires" content="Mon, 26 Jul 1997 05:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache" />
#5

[eluser]Colin Williams[/eluser]
Ok. If I were you, my next step would be searching Google for issues with the pragma: no-cache header in Firefox. And be sure you check the http headers too, not just the meta tags.
#6

[eluser]pallavi312[/eluser]
hello,
i have addded header also like this

header("Pragma: no-cache");
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: no-cache");
header("Content-Transfer-Encoding: binary");
#7

[eluser]pallavi312[/eluser]
i have added header. but still problem exists.
#8

[eluser]jedd[/eluser]
When you do a page / view source in your browser, are you seeing everything as it should be?

If you are, then the problem exists in your browser - as Colin suggested, you need to investigate known bugs with the browser declining to respect the instructions its given.

If you are not, then it's on your code side somewhere (and consequently will be much easier to resolve).




Theme © iAndrew 2016 - Forum software by © MyBB