Dynamic return to category page from product page

Question:
If I select a product from a particular category selection, I go to the product page. Great. Now I want to go BACK to that particular category. However the back button only permits you to go back to a specific category defined up front; you cant got back to the specific category you came FROM. Any solution?

Product:

Potentially you could save the current category page in session storage when you enter a product, then retrieve it from there and set the back button programmatically

Ughh that would require programming that I dont want to get into…I was hoping there was a way to do it strictly thru the designer. To get kicked back to a particular category one wasnt in from the products page would be quite irritating one would think. I am surprised it hasnt been addressed in the designer. Thanks for the response.