Does anyone know how to force a chart image generated by the ASP.Net Chart control not to be cached?
I have tried adding the following to the master page Page_Load method
Response.AddHeader("Pragma", "no-cache");
Response.CacheControl = "no-cache";
Response.Cache.SetAllowResponseInBrowserHistory(false);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
Response.Expires = -1;
With no joy.
Any ideas?
Thanks
This causes the file to be deleted after generation. The next time the page is loaded the chart control ought to generate a new chart, with a new id.
I guess the main question is: are you 100% certain the browser is actually caching the image?