Fixing the back button in Atlas

Nikhil has an excellent prototype that adds browser history management to UpdatePanel. The two things I like the most about this sample are the simplicity of the API and that it goes beyond just restoring the back button and bookmarkability.

The simplicity is brought by a very clean server-side, event-based model. All the complexity of client-side history management is hidden by the server-side API. Basically, you add state changes to the history from the server-side events that are triggered by the changes you want to keep track of, and you restore this very same state from another server-side navigation event. It can't get any simpler than that.

The way in which this goes beyond simply restoring the back button and bookmarkability is that *you* now decide which state changes should be considered navigation. So from a state of things where you had lost the back button, we end-up in a place where the back button makes a lot more sense than with ordinary postbacks. Furthermore, with postbacks, you never really had bookmarkability: saving a bookmark from a postback page did not save the POST state so what you bookmarked was not the stateful page, it was the page in its initial state.

Check it out:

No Comments