Skip to content

search: cache results so clicking back button does not re-run search

Administrator requested to merge jp/cacheresults into main

Created by: limitedmage

Fixes #24523 (closed)

Uses React context to cache results based on the options passed to the search function. If the results page is loaded again with the same options, the cached results are shown instead. This significantly improves user experience when navigating results, as they can click the back button and go back to the exact same result list as before.

Note: scroll position is not restored when clicking back. I'm looking for a solution to this and might update this PR or send a follow-up PR to address this.

Review tip: enable "ignore whitespace"

Merge request reports

Loading