I would like to turn off browser caching for my site and set a date in the past for expiry.
I have followed the answer in this article which has left me with almost perfect results, however I always get back a -1 for cache expiry, even after setting a date in the past.
If i remove the:
filterContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
the previous date is set in my header (although caching is still enabled).
I am led to believe that an " actual expiry date" is required over a "-1" because of an issue with IE (could still cache the page).
Is .net overwriting the SetExpires with a -1 if the HttpCacheability.NoCache is set?