How to refresh a page with jquery?

Last updated 1 year, 2 months ago | 277 views 75     5

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 from the cache, but it can be set to true to force a reload of 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);