I use Jquery to make an Ajax request. The server returns Json object with value "true or false" like this:
return Json(new { success = false, JsonRe
$.ajax("youurl", function(data){ if (data.success == true) setTimeout(function(){window.location = window.location}, 5000); }) )