$.ajaxSetup cache: What does that mean in jquery code

风格不统一 提交于 2020-12-05 07:20:57

问题


Today i have observed the following in a Jquery code:

$.ajaxSetup({ cache: false });

What does this mean? And what happens if the value of cache turns True.

Thank you in advance


回答1:


Read 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.



来源:https://stackoverflow.com/questions/32309483/ajaxsetup-cache-what-does-that-mean-in-jquery-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!