Monday, April 16th, 2007

dsHistory: another history / back button manager

Category: JavaScript, Library

Andrew Mattie has released a new JavaScript history manager that allows one to bind functions to history events either with or without changing the window hash (depending on the developer’s preference).

Andrew details his travels on getting this library out by discussing those who came before him:

A nice look at the trials and tribulations of managing history cross-browser. For dsHistory, you can check out the example page to play with it.


Posted by Dion Almaer at 6:46 am

3.8 rating from 29 votes


Comments feed TrackBack URI

Is Safari supported?

Comment by Les — April 16, 2007

Managing the back/forward button in an Ajax application also seems like the story of my life (well, at least for the past year and half). You can check out one of the two samples that I have:
The above demo should work on IE, FF, and Opera but I don’t think on Safari.
All of the above-mentioned libraries (including my solution) do not seem to work on IE unconditionally. What I mean is on IE, if you go back past the first page of the app and go forward again, the history cache is gone. I struggled but could not find a hack around it.
A drawback with my solution is it requires code on the server in order for me to get it working on Opera. I was in the process of turning it into some form of re-usable “thing”, then got discouraged when YUI comes out with their History Manager.

Comment by Kevin Hoang Le — April 16, 2007

Sorry, I do not mean to ‘hijack’ Andrew Mattie’s featured article. His library seems to be easy to use.

Comment by Kevin Hoang Le — April 16, 2007

Unfortunately, Safari is not supported at the moment. I hope to support it soon, but I have to wait until my wife gets her Mac first.

Comment by Andrew Mattie — April 16, 2007

Don’t forget about StateManager and SWFAddress (both of whice support Safari)

Comment by Geoff — April 16, 2007

I dont think it shoud be supported. It’s a hybrid that’s unatural.
Ajax apps are applications, and it’s more natural to have an ‘undo/redo’ option instead.

Comment by mikael bergkvist — April 16, 2007

I’m sympathetic to mikael’s viewpoint on this. I’d very much like to imagine that users will grow up eventually and stop relying on the back button for all their navigating. But then I find myself using it now and then, so I think it’s still required under certain circumstances. What we’re going through now is a process (that’ll likely take a couple of years) of sorting out exactly what those circumstances are. As long as we as developer/designers stay focused on the user requirements, I think the answers will become obvious with time, as more of us get it right. Then the rest of us can crib what they’ve done. :-)

In the meantime, I think it’s a waste of effort to imagine that every step of the user’s history has to be captured and replayed for them when they use the back button. I suspect that’s going to be about as much fun for users as Vista’s approach to keeping users from installing malware.

Comment by Leland Scott — April 20, 2007

Ajax apps are applications when they’re applications. Often, they’re just web sites.

Comment by Eric — April 23, 2007

There is free, opensource implementation of client-side undo manager with live examples availables on:

The article described the possibility of creation of persistent JavaScript objects and how to this solution expands area where JavaScript objects may be used:

Comment by Alexey Luchkovsky — June 15, 2007

hi, i found a full ajax website, and the back button works :

Comment by riper — June 16, 2007

Leave a comment

You must be logged in to post a comment.