Answers for "refresh page on back button click javascript"

0

refresh page on back button click javascript

window.addEventListener( "pageshow", function ( event ) {
  var historyTraversal = event.persisted || ( typeof window.performance != "undefined" && window.performance.navigation.type === 2 );
  if ( historyTraversal ) {
    // Handle page restore.
    //alert('refresh');
    window.location.reload();
  }
});
Posted by: Guest on June-25-2021

Code answers related to "refresh page on back button click javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language