Implementing a back button for reloading page with data from an external source (API)

Here’s my scenario:

There is a Search page where a user can submit a text search into an input box. This triggers a GET API request to get the data from an external source. The results of this request are displayed below the input box. When the user clicks on a result, it loads this, which is an external page, using the same window.

This is the functionality that currently exists, and is similar to, say, Google’s search engine results page.

I would like to add the following back button functionality where: When user clicks on the back button from the external page, it should re-load the search results that were displayed earlier.

I have a vague idea that this is to be done by getting the URL parameters and doing a search using those, but I don’t know how to get the URL parameters from this kind of implementation, given that I have no control over the external web page from where the user is coming back.

My last resort is to load the external page in a new window, but I feel this implementation is rather inelegant.

Any help would be greatly appreciated!

This topic was automatically closed after 70 days. New replies are no longer allowed.