Search This Blog

Friday, November 6, 2015

Page refresh in jquery

In this post, I have mentioned page refresh in jquery.


For this, we do multiple ways for this option:

  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)
  7. window.location.reload(true)



Example:

$( "#btnsuccess" ).click(function() {
         location.reload();
});

No comments:

Post a Comment