asp.net mvc disable browser cache

Posted by Palani on Stack Overflow See other posts from Stack Overflow or by Palani
Published on 2009-07-21T15:52:12Z Indexed on 2010/04/28 3:03 UTC
Read the original article Hit count: 631

Filed under:
|

I am looking for method to disable Browser Cache for entire ASP.Net MVC Website

I found following method,

Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache);
Response.Cache.SetNoStore();

and also meta tag method, ( It wont work for me , since some MVC Actions send partial html/json through ajax, without head,meta tag )

<meta http-equiv="PRAGMA" content="NO-CACHE">

But i am looking for simple method, to disable browser cache for entire website.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc