views:

10

answers:

1

Hi,

I'm using IIS 6 and added Cache-Control: no-cache header in IIS management console for entire website. However, when inspecting returned content with fiddler, I still see that Cache-Control: private is sent back to browser along with the response. No Cache-control: no-cache is sent though... Any ideas why?

On the other hand, when I used EndRequest method in Global.asax and set:

protected void Application_EndRequest(Object sender, EventArgs e)
{
    HttpContext.Current.Response.CacheControl = "no-cache";
}

I saw following headers in HTTP response:

Cache-Control: no-cache
Pragma: no-cache
Expires: -1

But I have a great deal of applications and would like to set the no-cache in one place, like IIS.

Thanks, Pawel

A: 

i know only one 100% no-cache technique - generate a "random" param e.g. 'myscript.aspx?myparam1=val1&myparam2=va21&...&r='+Math.random();

heximal
What if I have index.aspx page , which is an entry point to my application (I changed it recently and now I'm swamped with issues), and user browsers KEEP caching that page? It won't work. You could take a look at my previous question: http://stackoverflow.com/questions/4024847/frames-caching-issue-on-iis Thanks :)
dragonfly