Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 17:32:10
Original
1236 people have browsed it
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
Related labels:
ie
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template