(More specifically, how do I make it so that a sensitive report is not available simply by clicking the browser's "back" button?)
A. Easy. Simply read Peter Bromberg's excellent article on ASP.NET caching:
http://www.eggheadcafe.com/articles/20060407.asp
This is actually an in-depth piece about both server-side and client-side caching, but it includes the answer to this question, which is to include the following line of code in the page_load event of the page you want to affect:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
This will add a header to the http response that instructs both the browser and any intermediary proxy servers not to cache this page locally.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment