tags:

views:

90

answers:

2

I have a web application with login in system, and basically keeps you logged in if a session is still set.

Basically the problem is after the user logs out(session is terminated and user redirected to the login page), you could still technically access the last page accessed if you retype the url but if you click on anything you are redirected to the login page.

This only happens in Internet Explorer and I assume this is occuring since the pages are being stored in the cache , is there a way fix this issue?

+4  A: 

You must use this code, this avoids the caching of the page:

Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
tekBlues
Or<meta http-equiv="expires" content="-1" />in your actual markup.
Serapth
+1  A: 
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.CacheControl = "no-cache"
Response.Expires = -1

this code avoids the caching of page

Meetu Choudhary