Going back to a page (through browsers back button) loses the state of the page

Is it possible to keep the state of a page if the user moves off of it and click back on the browser?

I’m displaying a list of transactions, “View Transactions”. They can filter on different criteria.
For each transaction, you can click “View Receipt” and it takes the user to the receipt page.
When they click the browsers back button, their “View Transactions” page resets entirely and filters are wiped out.

@1Upper Yes. The clean way is to store the filter state in the URL or in the database instead of only in page states.

Most people pass the filter values as URL parameters when navigating to the receipt page. When the user comes back, the page reads those parameters on load and reapplies the same filters, so nothing resets.

If the filters are user-specific and reused often, you can also save them to the current user and load them again on page load. Either approach keeps the transaction view consistent when using the browser back button.

Custom states will reset when the page reloads or when the user navigates back using the browser, so they’re not reliable for preserving state in this case.

A common solution is to store your filters and UI state in URL parameters instead. When the user applies filters on the “View Transactions” page, you update the URL with those values (e.g. date range, status, search term).

Then, on page load, you read those URL parameters and re-apply them to your repeating group’s data source and inputs. This way, when the user clicks “View Receipt” and then uses the browser back button, the page reloads with the same parameters and the filters are preserved.

This works well for:
• Filters
• Pagination
• Selected tabs
• Search terms

Alternatively, you could also store the filter values in the database or in local storage, but URL parameters are usually the simplest and most transparent approach.