Author: ajcool123 | Posted on: 11/18/2008 11:53:18 AM | Views : 319

Hi Guys,

Okay here is my thought.  Would it be possible to add a piece of content to my pages that is never cached then when that content is requested, if you are not logged into the site it will automatically redirect to the login page. 

Basically my problem is that the browser is caching pages after logging out.  Browsing back through the history shows a cached version of the page, an obvious sercurity threat. 

Lately I have been adding this snippet to my code to disable caching, however I don't want to disable it completely on the page, I would want just a piece of content on the page to never cache.

Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();  Thanks guys for any ideas! ...

Go to the complete details ...