Ajax Browser History

I was just browsing through the Ajaxian.com blog and noticed this post which talked about one of the issues known as the “back button” issue.

Basically, what do you do when the user clicks on the back button in the browser? Naturally, the user expects to see the previous state of the page before they interacted with it to make changes, right?

Let’s say we have a pageable datagrid and we navigate to other “pages”. When you navigate to the next page, and then click on the browsers’ back button, a users’ natural reaction is to hope for the previous page that they were just reading.

Brad Neuberg has a good post on this (which was linked to from the Ajaxian Blog).

Looks very interesting… From Brad’s blog:

The Really Simple History framework, available here, uses several techniques to solve these bugs. The primary mechanism is achieved using DhtmlHistory, a JavaScript class that allows developers to store history state after the browser has left a web page. This data is persisted between page loads using the auto save capability of web forms; see my blog post “AJAX Tutorial: Saving Session Across Page Loads Without Cookies, On The Client Side” for implementation details. DhtmlHistory wraps the auto save trick with an easy hash table API for developers, and the main RSH framework then uses the DhtmlHistory class to implement stateless tracking of history; variables that allow the detection of fake versus real page load events; and more.

2 thoughts on “Ajax Browser History”

  1. I’ll be posting a howto for the Really Simple History framework soon; O’Reilly will also be publishing a more indepth tutorial on how to use the framework soon.

Comments are closed.