#wix-location #wix-storage #session
![](https://static.wixstatic.com/media/a27d24_55c095c43546484facc470589a68501a~mv2.png/v1/fill/w_691,h_411,al_c,q_85,enc_auto/a27d24_55c095c43546484facc470589a68501a~mv2.png)
Demonstrates how to use session storage to know which site page the visitor previously visited. The code needs to be placed in the Site tab so that it runs on all of the site's pages. The code retrieves the URL of the page a visitor previously visited from session storage. It then stores the URL of the visitor's current page in session storage. When the visitor navigates to another page, this stored URL is retrieved as the previous page URL.
Go to the Back Button page.
See more examples at Gramp's Workbench.
Many thanks as ever. How can I extend this so the back button returns users to a stored / persistent search result on the previous page?
Many thanks
Is there anyway to return the user to the place where they scrolled to on the previous page? When a customer scrolls to the bottom of my store page and selects a product to view, when they click the back button it takes them to the top of the store page.
Here is my site with your back button implemented. https://www.utahfurnituredeals.com/benches-ottomans
Sorry @Yisrael (Wix) but where can I find the "Site tab"?