jQuery.getJSON: how to avoid requesting the json-file on every refresh? (caching)
- by Mr. Bombastic
in this example you can see a generated HTML-list. On every refresh the script requests the data-file (ajax/test.json) and builds the list again.
The generated file "ajax/test.json" is cached statically. But how can I avoid requesting this file on every refresh?
// source: jquery.com
$.getJSON('ajax/test.json', function(data) {
var items =…