I have a page that consists of two frames: one being a flash app, and one being an aspx page with a user control that contains a grid with several "add to cart" buttons. When the user clicks a button I would like to reload the whole window with a shopping cart page.
I found out how to do so here quite nicely by avoiding response.redirect, and using response.write to insert some javascript that redirects. The problem is that when the user hits the back button from the shopping cart page, the script executes again, effectively canceling out the back button. (bad usability)
So my question is, is there a way to detect if the user arrived at the page via the back button and avoid executing the script?