MVC is adding Cache-Control = private to all of the requests. I tried removing the header using Response.Headers.Remove("Cache-Control")
with no sucess. How can I make MVC framework not add a default header Cache-Control=private?
Asked
Active
Viewed 1,194 times
1

Carlos Blanco
- 8,592
- 17
- 71
- 101
-
Your response header has to have Cache-Control. Instead of removing it, you can set the value to 'No-cache' or 'No-store' – Sparrow Apr 05 '17 at 17:38
-
See this post for more details: http://stackoverflow.com/questions/4480304/how-to-set-http-headers-for-cache-control – Sparrow Apr 05 '17 at 17:42
-
I wonder why. It's messing with an Expires header I'm setting as well. – Carlos Blanco Apr 05 '17 at 18:01