互联网浏览器缓存ASP.NETMVC阿贾克斯结果 [英] Internet Explorer Caching asp.netmvc ajax results
问题描述
我有一个问题,在Internet Explorer中的页面。 我有一个Ajax调用,调用形式,在其他浏览器中,当我点击控制器传递的链接,并加载正确的数据。但在IE浏览器,当其装载一次,跳投带给我同样的老结果没有通过在控制器中。
I'm having an issue with a page in internet explorer. I have an ajax call that calls a form, in other browser, when I click the link it passes in the controller and load correctly data. but in IE, when its loaded once, it aways brings me the same old results without passing in the controller.
推荐答案
尝试:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
这个属性,放在控制器类,禁用缓存。因为我没有在我的应用程序需要缓存,我把它放在我的BaseController类:
This attribute, placed in controller class, disables caching. Since I don't need caching in my application, I placed it in my BaseController class:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
public abstract class BaseController : Controller
{
下面是关于OutputCacheAttribute很好的说明:与提高性能输出缓存
Here is nice description about OutputCacheAttribute: Improving Performance with Output Caching
您可以将其放置在行动了。
You can place it on action too.
这篇关于互联网浏览器缓存ASP.NETMVC阿贾克斯结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!