changing window.location without triggering refresh

Posted by jdwyah on Stack Overflow See other posts from Stack Overflow or by jdwyah
Published on 2010-03-22T17:07:39Z Indexed on 2010/03/22 17:11 UTC
Read the original article Hit count: 227

Filed under:
|

I have an AJAX form that submits GET requests. Because these are all GET requests these should be easily bookmark-able. Preferably I'd make my Ajax request, update the screen and then update window.location.href to be the URL for the new page.

Unfortunately this reloads the page. Is there any way I can get around this? Basically I'd like the URL bar to be a permalink bar, but it needs to be able to change to keep up with the state of the page.

window.location.hash is no good because that doesn't get sent to the server.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about AJAX