Last Updated: February 25, 2016
·
373
· osallou

avoid ajax cache

Some framework/libraries cache the ajax queries (even json), leading to strange behaviours.
To avoid caching issues, simply add a fake/unique parameter to your url

.getJSON('http://....../mypage' +'?_='+jQuery.now(), ....

If you don't use jquery, just add a javascript timestamp or a unique request id.