[thelist] preserve state when manipulating the DOM

Kasimir K evolt at kasimir-k.fi
Mon Dec 12 13:42:36 CST 2005


Ivo P scribeva in 2005-12-10 00:33:
> How do you folks go about preserving the UI state in case a user hits
> refresh? or backward then forward?
> 
> My first attempt was to notify the backend using XmlHttpRequest of UI
> changes but maybe there is an easier way to maintain all this on the
> client.

I have to admit that I've personally given this too little thought. So I 
did a quick Googling and found some interesting links:
http://www.onjava.com/pub/a/onjava/2005/10/26/ajax-handling-bookmarks-and-back-button.html

and on another one
http://www.ok-cancel.com/archives/article/2005/09/why-ajax-matters-now.html
there's a comment saying "This does mean is that web designers will need 
to learn a new way of thinking. State transition, which was primitive on 
the page-based web, has now gotten more complex. State recovery, which 
was handled with back buttons and bookmarks, must now be managed in a 
more mature way–must be baked in to the structure of your application, 
rather than supplied from without. But if the application design is done 
well, users will not miss the back button, of all things."

And IIRC, dojo has ways of dealing with back button probs:
http://dojotoolkit.org/
...but it's not light weight ;-)

For more, just http://google.com/search?q=ajax+broken+back+button

HTH,
.k



More information about the thelist mailing list