How can I refresh a page with jQuery?
Advertisement
How can I refresh a page with jQuery?
Javascript
jQuery
refresh
reload
- asked 10 years ago
- B Butts
3Answer
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
- G John
location.reload();
Should work on all browsers even without jQuery
- answered 10 years ago
- Sunny Solu
Lots of ways will work, I suppose:
window.location.reload();history.go(0);window.location.href=window.location.href;
- answered 10 years ago
- Sunny Solu


Your Answer