• support@answerspoint.in

How can I refresh a page with jQuery?

21
Advertisement

How can I refresh a page with jQuery?

2Answer


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 10 years ago
  • Sandy Hook

0

There are unlimited ways to refresh a page with JavaScript:

  1. location.reload()
  2. history.go(0)
  3. location.href = location.href
  4. location.href = location.pathname
  5. location.replace(location.pathname)
  6. location.reload(false)

  • answered 10 years ago
  • Gul Hafiz

Your Answer

    Facebook Share        
       
  • publish 10 years ago
  • viewed 21 times
  • active 10 years ago

Best Rated Questions