if condition for reloading in javasript code example
Example 1: jquery reload page
$('#myElement').click(function() {
location.reload();
});
Example 2: javascrpt refresh page
location.reload();
$('#myElement').click(function() {
location.reload();
});
location.reload();