简体   繁体   中英

Caching ajax responses

For an identical url and myObj , and assuming that the server doesn't provide any headers not to cache, will most modern browsers cache the response for sequential requests? If myObj is different, please confirm that the response will not be cached.

$.getJSON(url, myObj,function( json ) {console.log(json);});

If the URL and data arguments are the same, the response will normally be cached. Browsers use the same logic for caching AJAX GET responses as they do for caching web pages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM