refresh page after jquery ajax
You could possibly do a setTimeout, to make it wait for a split second before the refresh can execute.
function sendRating(rating, reload_on_return) {$.ajax({ type: "POST", dataType: 'json', url: window.url_root + cid + "/", async: false, data: { "rating": rating.r2 / 100.0 }, success: function(data) { if (data.hasOwnProperty('success')) { console.log("data was sent!"); if (reload_on_return) { setTimeout( function() { location.reload(); }, 0001); } } }, error: function() { console.log("Data didn't get sent!!"); }})