It sounds like you're looking for the HTML5 History API.
A very good intro on how it works can be found at http://diveintohtml5.info/history.html .
Additional information can be found at http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html .
Also, you should look into polyfilling the feature for older browsers. There are plenty of options for doing so including https://github.com/browserstate/history.js , which includes some sample code and even a working demo (http://browserstate.github.io/history.js/demo/).
You can us hash which you append to the URL to fetch history changes.
index.html -> user opens popover ->
Now a click to the back button will redirect back to