I want to disable Browser Caching in a specific View.
I tried Response.Cache.SetCacheability(HttpCacheability.NoCache);
in a controller that returns the View, but that does not work.
Any suggestions are greatly appreciated.
Thank you.
I want to disable Browser Caching in a specific View.
I tried Response.Cache.SetCacheability(HttpCacheability.NoCache);
in a controller that returns the View, but that does not work.
Any suggestions are greatly appreciated.
Thank you.
Try using the meta tag directly
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
put that at the top of your header. although the Response.Cache call is supposed to just put that in for you.
Edward,
I actually saw a great suggestion here on SO for this very issue (tho based on logging out of a session and wanting the pages to expire) that would work perfectly for you:
hope this helps...