<p>I'm writing an AJAX app, but as the user moves through the app, I'd like the URL in the address bar to update despite the lack of page reloads. Basically, I'd like for them to be able to bookmark at any point and thereby return to the current state. </p>

<p>How are people handling maintaining RESTfulness in AJAX apps? </p>

This is similar to what Kevin said.  You can have your client state as some javascript object, and when you want to save the state, you serialize the object (using JSON and base64 encoding).  You can then set the fragment of the href to this string.
```
```
var encodedState = base64(json(state));
var newLocation = oldLocationWithoutFragment + "#" + encodedState;

document.location = newLocation; // adds new entry in browser history
document.location.replace(newLocation); // replaces current entry in browser history
```
```
The first way will treat the new state as a new location (so the back button will take them to the previous location).  The latter does not.