我使用jQuery进行一些Ajax调用,以获取文件,如下所示:
$.ajax({
url: "/resx.mvc",
data: {
virtualPath: options.virtualPath,
keys: options.keys,
global: options.global
},
cache: true,
success: function (values) {
$.extend(assignTo, values);
},
dataType: "JSON",
traditional: true
});
当我在Fiddler中查看请求时,我发现这两个头部被发送,并使我的ASP.NET响应中返回了一个过期标头-1。
Pragma: no-cache
Cache-Control: no-cache
我该如何告诉jQuery不要发出no-cache请求?