Jquery ajax缓存问题
我有以下资料:Jquery ajax缓存问题,jquery,ajax,Jquery,Ajax,我有以下资料: $.ajax({ type: "post", url: "something.cfm", data: formData, cache: false, success: function(result) { $('#formSub').html('<input type="button" name="btnSave" id="btnS
$.ajax({
type: "post",
url: "something.cfm",
data: formData,
cache: false,
success: function(result) {
$('#formSub').html('<input type="button" name="btnSave" id="btnSave" class="submitButton save" value="Save" disabled="disabled"/>');
},
error: function(xmlHttpRequest, status, err) {
confirm('Error!' + err );
}
});
$.ajax({
类型:“post”,
url:“something.cfm”,
数据:formData,
cache:false,
成功:功能(结果){
$('#formSub').html('');
},
错误:函数(xmlHttpRequest、状态、错误){
确认('Error!'+err);
}
});
在IE8或IE7上,有时success功能不运行,禁用的btnSave不会出现。因此,人们不断提交相同的表单,在处理另一个应用程序时,我发现cache:false似乎不起作用
cache
Default:true,对于数据类型“script”和“jsonp”,如果设置为false,则会强制浏览器不缓存您请求的页面:您如何知道结果正在被缓存?可能还有其他原因吗?您是否尝试过寻找“完整”事件处理程序?查看jQuery的源代码,只有在执行GET请求而不是post时,才会使用缓存参数。缓存POST请求实际上毫无意义。这听起来像是连微软都不会搞砸的事情。你们也可以检查答案