Test Ajax Cache Response
by magicaj
HTML
<script src="https://github.com/adamayres/jqueryplugins/raw/master/ajax-cache-response/jquery.ajax-cache-response.js"></script>
<div id="ajax">Get ajax</div>
JavaScript
$(document).ready(function() {
$.ajaxCacheResponse.storage = window.sessionStorage;
$("#ajax").click( function() {
$.ajax({
url: '/echo/json/',
cacheResponse: true,
cacheResponseTimer: 5000,
success: function(data) {
console.log(data);
}
});
});
});