Use cookie to save last query.

When user clicks link in search result the query is saved until next page load.