How to refresh a page with jquery?

210 Views

How to refresh a page with jquery?

Jquery | Location reload() Method | Refresh a page

The Location.reload() method reloads the current URL.

Syntax

location.reload(forceGet)

The Location.reload() method reloads the current URL. By default, the value of forceGet is false which reloads the page form the cache, but it can be set to true to force a reload the page from the server rather than the cache.

 <script>

//Reload the current page from cache

$('button').click(function() {
    location.reload();
});

</script>

 

 // Reload the current page without the browser cache
location.reload(true);