大家好,我试着理解这句(来自JQuery.ajax())关于缓存选项的句子:
除了在IE8中,当一个帖子被发送到一个已经被GET请求的URL时。
如果有人能帮我做一些简单的例子和解释,我会非常感激的,谢谢大家,祝你们今天愉快。
发布于 2013-12-21 08:35:46
从@Kevin B的评论“如果您在IE8中发出一个GET请求,然后向同一个URL发出一个POST请求,IE8将错误地返回缓存的响应,而不是执行这个帖子。”
$.ajax({
type: "GET",
url: "test1.htm"
});
/* In IE8 this comes from the cache */
$.ajax({
type: "POST",
url: "test1.htm"
});
$.ajax({
type: "GET",
url: "test2.htm",
cache: false // adds a timestamp to the querystring
});
/* Even IE8 avoids the cache */
$.ajax({
type: "POST",
url: "test2.htm"
});https://stackoverflow.com/questions/20716781
复制相似问题