页面重新加载后的相同Ajax响应

I am building a website where I am loading the content through an Ajax request. So when the user clicks on a link I prevent a page reload and load the content with Ajax in the main area. Now I have the problem that if the user clicks on the refresh button they will be thrown away to the very first page. Is there a way to somehow store where the user is in the page in the moment and to recall that value at a reload so that I can call the same Ajax Request the user had last?

Let me know if you need any specific code.

Thanks a lot!

David

It's common for Single Page Applications to use hash parameters in the URL to keep a track of the page state.

You can use session or JS cookie to persist the data through user session.