Microsoft Edge和IE上的Twitter Bootstrap Modal缓存(最新版本)



我在使用Twitter Bootstrap modals时遇到问题,因此我的ajax calls没有在Bootstrap modals中更新。它们是如何影响数据库的。

例如。

我将提交一份新的公民身份,无论如何——显示公民身份列表的模式并不能反映这一变化。

在启动模态或在控制器中时,是否有清除缓存或设置nocache标志的方法?

这是jQuery方法,它是在单击链接以填充模态时调用的。

$("body").on("click", ".modal-link", function(e) {
     e.preventDefault();
     $(this).attr("data-target", "#settings-modal");
     $(this).attr("data-toggle", "modal");
});

这是点击的链接:

@Html.ActionLink("Citizenships", "Index", "Citizenships", new {@class = "modal-link",title = ""})

您可以使用$.ajaxSetup({ cache: false })来阻止ActionLinks被缓存。将它放在文档的末尾,或者在文档准备就绪时调用它。

最新更新