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
With HTML 5, use the history.pushState function. As an example:
and a href:
Click to change url to bar.html
If you want to change the URL without adding an entry to the back button list, use history.replaceState
instead.