title: Know if loaded page comes from a back button pressed
body: <p>Is there any way to know if the loaded page comes from a back button call?</p>
  
  <p>This is the path:</p>
  
  <ol>
  <li>index.html (link to page1 in the menu) </li>
  <li>page1.html (loads content from ajax with link of page2)</li>
  <li>page2.html (press BACK button)</li>
  <li>page1.html (DETECTS BACK BUTTON PRESSED FROM PAGE2, THEN DO SOMETHING)</li>
  </ol>
  
  <p>Page 2 can be loaded from pageX so it is not an option to use <code>onbeforeunload</code> or something like that to handle back/forward button in page2 to redirect to page1, page2's back button can redirect to pageX instead of page1.</p>
  
  <p><strong>I need to put the code in page1</strong></p>
  
  <p>Is it possible?</p>