Disabling cliend side cache via code

  • Thread starter Thread starter Curia Damiano
  • Start date Start date
C

Curia Damiano

Using VS 2003, I create a new web application.
In the Page_Load of the main page I insert:
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(new DateTime(1990, 1, 1));
but in the header of the resulting page nothing changes!

So I've tried with:
Response.ClearHeaders();
Response.AppendHeader("xx", "yy"); // to adjust
but even in this case, nothing changes...

Then I've tried to move these instruction at the
beginning and at the end of the OnInit event, but even in
this case nothing changes.

Can someone help me, plese?
Thanks, Curia Damiano

PS I need to set them via code, because in reality these
instruction go in a page defined by me, from whom all the
page of the my web-app derive.
 
Re-posted to
microsoft.public.dotnet.framework.aspnet.caching, sorry
but I've seen it too late...
 
Thanks for your tip, but I'd expected to see some new
tags in the header of the page.
Why there aren't new tags?
Thanks again, Damiano
 
Back
Top