Jquery : Refresh/Reload the page on clicking a button
You should use the location.reload(true)
, which will release the cache for that specific page and force the page to load as a NEW page.
The true
parameter forces the page to release it's cache.
If your button is loading from an AJAX call, you should use
$(document).on("click", ".delegate_update_success", function(){
location.reload(true);
});
instead of
$( ".delegate_update_success" ).click(function() {
location.reload();
});
Also note the true
parameter for the location.reload
function.