Possible Duplicate:
Change the URL in the browser without loading the new page using JavaScript
Example of what I’m trying to do:
User is at /things/list, then clicks ‘new thing’ which takes them to /things/new they fill in the needed info for the thing click save and the url changes to /things/123 and then they click the back button in their browser and it takes them to /things/list instead of /things/new. Is something like this possible?
If the code that goes from
/things/newto/things/123useswindow.location.replace('/things/123'), then the back button will go tothings/listlike you want because/things/newin the browser history will have been replaced in the history list.