[nycphp-talk] ajax and un-breaking the ol' back button
David Mintz
david at davidmintz.org
Wed Apr 2 09:53:11 EDT 2008
So I had what I thought was a pretty cool ajaxified page where you could
browse data -- in this case, lists of events scheduled on a given date -- by
choosing a date with a popup calendar or clicking arrows to navigate forward
and back. The javascript callback sends an ajax request to update the
relevant part of the doc. Oh, but then you navigate to another page, then
click your back button and guess what, this page reverts to its defaults
instead of staying in the state you left it. Is this not an example of
breaking the back button?
Before I start trying to un-break it please tell me if this logic is sound:
when they do an ajax request, store the query params in the session.
Whenever they GET the page itself, look first for these session vars and use
them if they exist, else use the defaults.
Thanks!
--
David Mintz
http://davidmintz.org/
The subtle source is clear and bright
The tributary streams flow through the darkness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080402/3b798924/attachment.html>
More information about the talk
mailing list