How to create a back button

@yisrael-wix Hi Yisrael! Is there a way to create a back button using the onclick event? Im trying to create a button that also brings them to their scroll location as well when they click it but using the code you provided only works without an onclick for the same button. Im trying to get the one button to bring the user to the previous page and to the same scroll location. Is there code that could bring the user to the previous page using the onclick function?

@robbieyamada In the onClick() event handler, you can use wix-location.to() to “go back”.

Hi @yisrael-wix awesome example, thanks!
And I loved the " No cats were harmed in the making of this website" lol.

Questions: Is it possible to create a ‘Go back’ to a previous page that had a dataset filtered? See here: https://www.job.co.nz/search-job We are working on a ‘Search Job’ function. everything is working perfect now. BUT when visitors go to each Job (Dynamic pages), then they click on ‘Back’ on the browser, visitors need to filer again. Therefore we are trying to implement a Go-Back option on the dynamic page that links to principal search page with the previous filtered results. is that possible?

@david-camacho-baron You can use the technique demonstrated in the example of saving the pertinent information to wix-storage. For another example that demonstrates saving relevant information to wix-storage for later use:

Saved Search
Save search parameters for future searches.