Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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();
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to make javascript progarm that randomly displayes a word 
Javascript :: JavaScript create ul li from array 
Javascript :: js number validation 
Javascript :: js get transition duration 
Javascript :: js get user location 
Javascript :: get current url in jsp page 
Javascript :: function click anywhere javascript 
Javascript :: convert dict to json python 
Javascript :: create an array of numbers by numbers range in angular 
Javascript :: javascript simulate key press 
Javascript :: setting proxy in npm 
Javascript :: removing duplicates in array javascript 
Javascript :: how to click button programmatically in jquery 
Javascript :: background image url react 
Javascript :: props.history.push with data 
Javascript :: local storage javascript object 
Javascript :: react native textinput lowercase 
Javascript :: how to check if localhost javascript 
Javascript :: how to check if object is empty javascript 
Javascript :: sweet alert 2 do action on confirm 
Javascript :: NullInjectorError: No provider for HttpHandler! 
Javascript :: how to check if 2 images are touching js 
Javascript :: how to toggle the classlist in Javascript 
Javascript :: how will it look when there is a container inside a a row bootstrap 
Javascript :: javascript read json file 
Javascript :: how to make javascript make things disappear 
Javascript :: keyup multiple fields 
Javascript :: write files in node js 
Javascript :: add 1 year to current date javascript 
Javascript :: open html file in browser using package.json 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =