Search with Views not Saving Selected Filters when user tries to go BACK I've created a search page using Views with exposed filters and the basic search module. The search only returns results for a specific node content type 'resource'. A typical use case would be the following:

User goes to search page, types some text into the exposed search terms block, and also selects some options from the exposed filters that are drop-down menus. They click 'search' and their results are returned on the same page. Pretty standard stuff and I have that all working fine.

A user then clicks a link to a resource node of interest to them and goes to that node's profile page. All fine and dandy.

The problem is when they want to go BACK. I went ahead and added a back button with the following code to my node--resource.tpl.php, which works as you'd expect (it bypasses the browser back button and takes user to main search page again):

&lt;input type="button" value="Go Back" onclick="window.history.back()" /&gt;


What happens is it displays the search page again, but no longer with the search term they entered OR the exposed filters they selected. I'd like to change that so when they click the 'back' button the search page still shows their search results from before so they don't have to re-select all their options again. 

This seems like pretty basic stuff, but I can't figure out how to do it in Drupal. I imagine it involves session cookies somehow...but how to combine this with Views I do not know.

Thanks for your help!
Ok, I solved my own question. To get Views search results to 'stick' you just have to select an option for each filter you want to save and the role that this works for.

In Views > Filters > check the box next to 'remember the last selection' and select which roles this applies to.

Easy. Now when a user clicks the 'back' button I've added to the tpl file it takes them back to their selections.