Home >Web Front-end >JS Tutorial >Analysis and solutions to the reasons why $.getJSON fails under IE_jquery

Analysis and solutions to the reasons why $.getJSON fails under IE_jquery

WBOY
WBOYOriginal
2016-05-16 17:32:101262browse
Copy code The code is as follows:

$.ajaxSetup({ cache: false });
$ .getJSON("/MyQueryUrl",function(data,item) {
// do stuff with callback data
$.ajaxSetup({ cache: true });
});

Cause: getJson will use the browser cache by default under IE, so the data will not be displayed
Solution: Let it not use the cache

There are more solutions here
http://stackoverflow.com/questions/264216/getjson-returning-cached-data-in-ie8
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn