How to return users to the scroll position of the previous page

You can store values in the URL as a parameter. If when a user clicks to go to another page, you capture the scroll position and send that in a URL parameter to the same page just before you navigate them to the new page, it will put the URL parameter in.

When using the go to page workflow action to send a URL parameter the change to the URL is almost instantaneous, the page doesn’t reload or anything and it should be fast enough to get that scroll position value into the URL parameter before then sending them to the next page. This way when they hit back button on browser, the URL parameter will be there and you can run a page is loaded workflow to extract the URL parameter to then scroll to that position of the URL parameter. This is similar to why @bkerryk gets the function he has of showing the same view based on the URL parameter.

You can also use @mikeloc suggestion, because as far as I am aware, Bubble stores cookies for your users up to 72 hours when they are not logged in or registered, so any data entries they create while not logged in are still tracked to them as a user for up to 72 hours. This is how the ‘created by’ field gets populated with the correct user if the user was not registered when making an entry to the DB but within the 72 hour window registers.

4 Likes