How do I, with javascript, change the URL in the browser without loading the new page?

Posted by Steven Noble on Stack Overflow See other posts from Stack Overflow or by Steven Noble
Published on 2008-09-25T22:00:38Z Indexed on 2010/03/08 13:21 UTC
Read the original article Hit count: 336

Filed under:

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 the new url is used? It would also be nice if the back button would reload the original URL.

EDIT: as moonshadow correctly assumes I am trying to record javascript state in the URL

© Stack Overflow or respective owner

Related posts about JavaScript