Detect if the user has used the back button

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-03-23T09:20:53Z Indexed on 2010/03/23 9:23 UTC
Read the original article Hit count: 441

Filed under:
|

My webpage runs a javascript function when the page is loaded. However, I don't want the function to run if the user comes back to this page using the back button. How can I prevent this using javascript?

$(document).ready(function(){
  // Do not run this function if the user has arrived here using the back button  
  RefreshThePage();
});

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about back-button