I'm fetching the current Facebook like count with a code like this:
$(document).ready(function() {
$.getJSON('https://graph.facebook.com/<username>?callback=?', function(data) {
var fb_count = data['likes'].toString();
$('#fb_count').html(fb_count);
});
});
However, when user browses pages the request is sent again. Is there a way to fetch the data only once per session and keep the fetched value in the HTML element without a new request, until user closes the browser?
Thanks for any help!