Wondering how to refresh page with JavaScript or jQuery? It's quite easy..

Method 1:

$('#someid').click(function() {

    location.reload();

});

The reload() function takes an optional Boolean parameter that can be set to true to reload from the server rather than the cache. The parameter defaults to false, so by default the page reloads from the browser's cache.

Method 2-6:

All these methods need to be attached to some event in order to work.

history.go(0);

location.reload();

history.go(0);

location.href = location.href;

location.href = location.pathname;

location.replace(location.pathname)