I\'m playing around with ASP.net MVC and JQuery at the moment. I\'ve come across behavour which doesn\'t seem to make sense.
I\'m calling JQuery\'s $.getJSON
Just to let you know, Firefox and Chrome consider all Ajax request as non-cachable. IE (all versions) treat Ajax call just as other web request. That's why you see this behavior.
How to force IE to download data at each request:
Code:
public class NoCacheAttribute : ActionFilterAttribute
{
public override void OnActionExecuted(ActionExecutedContext context)
{
context.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
}