Dynamic panels back button
I have an issue where I am using dynamic panels but need to go to the previous panel when the user presses the back button. Since there are multiple ways in which a user can arrive at the active panel in question, I can't just statically take them back to a particular panel when they press the back button - I need to take them back to the previous panel they were on. Dynamic panels are very powerful, but without a "go to previous panel" option they are quite useless to me. Any ideas on how this functionality can be accomplished? Thanks in advance!