Get search term not on searh results page?

Best solution would be to store the search phrase on the client-side via local storage or, where not available, in a cookie.