Issue with hash url in javascript?
<p>I am using url hash to scroll the page. What i am doing is, say i have 2 pages :</p>

<p><code>Page1</code> and <code>Page2</code></p>

<p>First i navigate from <code>page1</code> to <code>page2</code> and set the url hash than my url will become :</p>

<pre><code> http://localhost:48785/page2#id
</code></pre>

<p>I am setting hash using this code:</p>

<pre><code>window.location.hash = "id";
</code></pre>

<p>Than i press browser back button and went to previous page i.e. <code>page1</code>. Upto this point everythings work fine.</p>

<p>The Issue occure when i set hash twice on page2. Like:</p>

<pre><code> http://localhost:48785/page2#id

 http://localhost:48785/page2#id2
</code></pre>

<p>Now when i press browser back button, it just navigate back and forth between hash #id and #id2. </p>

<p>Why the back button not taking me to the previous page i.e. page1 after setting hash twice on page2 ? </p>
