1
votes

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

1
Basicall what I've spotted seconds ago, is that Cache-control headers are nicely added to any css,js etc content, but no to aspx responses :/ - dragonfly

1 Answers

0
votes

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