加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

$.ajaxSetup cache:这对jquery代码意味着什么

发布时间:2020-12-16 02:48:51 所属栏目:百科 来源:网络整理
导读:今天我在 Jquery代码中观察到以下内容: $.ajaxSetup({ cache: false }); 这是什么意思?如果缓存的值变为True,会发生什么. 先感谢您 解决方法 阅读 jQuery.ajax() cache ( default: true,false for dataType 'script' and 'jsonp' ) Type: Boolean If set t
今天我在 Jquery代码中观察到以下内容:

$.ajaxSetup({ cache: false });

这是什么意思?如果缓存的值变为True,会发生什么.

先感谢您

解决方法

阅读 jQuery.ajax()

cache (default: true,false for dataType 'script' and 'jsonp')
Type: Boolean If set to false,it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending “_={timestamp}” to the GET parameters. The parameter is not needed for other types of requests,except in IE8 when a POST is made to a URL that has already been requested by a GET.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读