How can I refresh a page with jQuery?
2Answer
Use location.reload():
$('#something').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.
- answered 10 years ago
- Sandy Hook
There are unlimited ways to refresh a page with JavaScript:
location.reload()history.go(0)location.href = location.hreflocation.href = location.pathnamelocation.replace(location.pathname)-
location.reload(false)
- answered 10 years ago
- Gul Hafiz


Your Answer