Which take preferance when we have multiple entries for Cache control?

!nvert

New Member
I wanted to disable Application level cache for my ASP.NET application.So I have added following Custom header in web.config \[code\]<httpProtocol> <customHeaders> <add name="Cache-Control" value="http://stackoverflow.com/questions/15586889/no-cache" /> <add name="Pragma" value="http://stackoverflow.com/questions/15586889/no-cache" /> <add name="Expires" value="http://stackoverflow.com/questions/15586889/-1" /> </customHeaders>\[/code\]However when I see Reponses header in Developer tool in IE9 I could see
  • Cache Control : private, no-cache
  • Pragma : no-cache
  • Exprires : -1
So I am not sure whether Client Side cache is disable or not as it shows private as well as no-cache.Also when I disable cache in page_load using Response.Cache.SetCacheability(HttpCacheability.NoCache); Response header showsI could see
  • Cache Control : no-cache
  • Pragma : no-cache
  • Exprires : -1
Please let me know in case of Cache Control : private, no-cache which one gets the preference.
 
Back
Top