Remove/Disable javascript when using browser's back button
<p>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.  </p>

<p>I found out how to do so <a href="http://weblogs.asp.net/ksamaschke/archive/2003/02/23/2831.aspx" rel="nofollow">here</a> 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)</p>

<p>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?</p>
