title: Keep SESSION value OR Cookies when hitting back button
body: <p>I have two pages. The page 2 is accessible by the page 1.</p>
  
  <p>The thing is I want to detect if someone came back to page 1 by the page 2 <strong>with a return button</strong> in order to display an other thing.</p>
  
  <pre><code>      PAGE 1 -------------------------&gt; PAGE 
   Normale Display             Create SESSION or COOKIE
                                           |
                                           |    
  If SESSION or COOKIE  &lt;--------- Pressed back button
  -&gt; Secondary Display
  </code></pre>
  
  <p>So I tried to :</p>
  
  <ul>
  <li>Create a cookie but it wasn't read </li>
  <li>Create a Session variable but
  it wasn't read neither</li>
  <li>Empty the cache but I ended up with a warning message</li>
  <li>Local Storage / Session Storage still react like a Cookie</li>
  </ul>
  
  <p>Does anyone see a solution for me, either to force the read of one of those thing or force the page to acte as if it was a normale way of going to it when back button pressed?</p>
  
  <p>Im open to any solution It's been two long days going around in circle.</p>
  
  <h2>EDIT :</h2>
  
  <p>Let change a bit my question by : <strong>How to detect if a page is reach using back button?</strong></p>
  
  <p>So I've seen <a href="https://stackoverflow.com/questions/829046/how-do-i-detect-if-a-user-has-got-to-a-page-using-the-back-button">this question</a> but its an old one (2009) and an answer using Iframe which if I could avoid I'd like too.</p>