我有一个奇怪的问题。我有一个运行MVC 4和JQuery 2.1.3的Web应用程序。当应用程序在IE 9中发出JQuery调用时,有些用户会收到403响应错误但是当我们让它们清除浏览器缓存时问题就会消失。什么会导致这种行为的任何线索?不幸的是,公司标准是IE 9,但我们很快就会升级到11。
添加了备注。该应用程序正在使用捆绑。
var jqxhr = $.post(
$("input[name=root]").val() + "Donate/JsonXXXX", {
EmployeeId: $("#EmployeeId").val(),
__RequestVerificationToken: $("input[name='__RequestVerificationToken']").val(),
})
.done(function (data) {
if (data.length == 0) {
// Success.
$("form#pledgeForm").submit();
}
else {
HideWorkingPopup();
$('#myJGrowlMessage').jGrowl(data, { theme: 'error', closer: false, glue: 'after', header: 'Failure', sticky: true });
}
})
.fail(function (e, textStatus, errorThrown) {
HideWorkingPopup();
// Logging the failure reason
if (e != null) {
try{
var responseText = $.parseJSON(e.responseText);
}catch(ex){
var responseText = '';
}
try{
var jqXHRObj = $.parseJSON(e);
} catch (ex) {
var jqXHRObj = '';
}
$.post(
$("input[name=root]").val() + "Donate/JsonFailure", {
message: "jqXHR.responseText --> " + responseText + "\n jqXHR --> " + jqXHRObj + "\n textStatus --> " + textStatus + "\n errorThrown --> " + errorThrown,
__RequestVerificationToken: $("input[name='__RequestVerificationToken']").val(),
})
}
$('#myJGrowlMessage').jGrowl("There was an error saving your donation. Please try again later.", { theme: 'error', closer: false, glue: 'after', header: 'Failure', sticky: true });
});