• support@answerspoint.com

How can I refresh a page with jQuery?

3Answer


0

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 8 years ago
  • G John

0
location.reload();

Should work on all browsers even without jQuery

  • answered 8 years ago
  • Sunny Solu

0

Lots of ways will work, I suppose:

  • window.location.reload();
  • history.go(0);
  • window.location.href=window.location.href;
  • answered 8 years ago
  • Sunny Solu

Your Answer

    Facebook Share        
       
  • asked 9 years ago
  • viewed 2028 times
  • active 9 years ago

Best Rated Questions