Another thing:
It isn't clear from the discussion so far is you want to CLOSE the browser, or return the user back to the page they were on before they got to your site. It sounds to me that you mean the latter.
You could store the ReferrerURL when a user first hits your application. Then your "close" functionality could just redirect them back to where they were. This wouldn't provide a complete "rewind" like behavior, but it's as close as you're likely to get.
-
Peter