HTML5 enable you to store data locally which I think it is great. For example here is how you can use it:
var store = window.localStorage; st
Use a FileReader to encode your image as a data URL:
jQuery.ajax({...}) .done(function (r) { var reader = new FileReader( reader.onload = (function(self) { return function(e) { document.getElementById("img").src = e.target.result; } })(this); reader.readAsDataURL(new Blob([r])); });