0

I have two html pages: mainpage.html and secondPage.html The first page works like the layout:

 <div id="header"></div>
 <div id="home"></div>
 <div id="footer"></div>

the second:

<div id="content"></div>

So when i click on a button in the home div i have a function that charge the #content inside the #home, until here everything works good. In few words i refresh only #home. Now I want that when I click the back button of the browser I come back to the old home because now if i do this it goes to the previous page.

Is there a way to do this?

joumvaer92
  • 252
  • 3
  • 14
  • Take a look at this answer, maybe it help you...http://stackoverflow.com/questions/12381563/how-to-stop-browser-back-button-using-javascript – pecci Dec 14 '14 at 18:02
  • Use history.pushState function, it works perfect in modern browsers. – genichm Dec 14 '14 at 20:23

0 Answers0