anchor links referring to the page sections not working on browser refresh, back and forward

Viewed 1681

I have made a html page with links inside the page.

<div>
<a href="#first">first</a>
<a href="#second">second</a>
<div id="first">First div</div>
<div id="second">Second div</div>
</div>

But this code doesn't work on page refresh and browser back and forward buttons. Does anyone know how to solve this problem. I am not looking for history api of html5 and history plugin of jquery. Want to create this in its basic format.

1 Answers
Related