Monday, April 16th, 2007
dsHistory: another history / back button manager
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:
- Really Simple History (RSH), Brad Neuberg
- AJAX-Nav, Mike Stenhouse
- dojo.io.bind, Alex Russell, et al
- YUI Browser History Manager, Julien Lecomte
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.













Is Safari supported?
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:
http://commerce2.pragmaticobjects.org/
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.
Sorry, I do not mean to ‘hijack’ Andrew Mattie’s featured article. His library seems to be easy to use.
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.
Don’t forget about StateManager and SWFAddress (both of whice support Safari)
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.
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.
Ajax apps are applications when they’re applications. Often, they’re just web sites.
There is free, opensource implementation of client-side undo manager with live examples availables on: http://www.soft-amis.com/jsoner/undo.html.
The article described the possibility of creation of persistent JavaScript objects and how to this solution expands area where JavaScript objects may be used: http://ajaxline.com/undo_manager
hi, i found a full ajax website, and the back button works : http://itbreaks.net