How would I have a JavaScript action that may have some effects on the current page but would also change the URL in the browser so if the user hits reload or bookmark, then
There's a jquery plugin http://www.asual.com/jquery/address/
I think this is what you need.