How to refresh a page with jQuery?

Get support on JavaScript,jQuery, AJAX and other related technology.
Post Reply
admin
Site Admin
Posts: 44

How to refresh a page with jQuery?

Post by admin » Wed Oct 16, 2019 11:25 pm

Use location.reload():

Code: Select all

$('#element').click(function() {
    location.reload();
});
The reload() function takes an optional parameter that can be set to true to force a reload from the server rather than the cache. The parameter defaults to false, so by default the page may reload from the browser's cache.

Post Reply