AJAX: How to Handle Bookmarks and Back Buttons
Subject:   Awesome code package
Date:   2006-06-29 01:29:36
From:   joshua_70448
I just started using AJAX on my website,, using the Yahoo! Developer code to run the requests, and I found your code as a way to fix the history/bookmark problems in AJAX. Very nice stuff, I managed to get it working quite easily. One minor gripe, though: In IE, I've got blank.html in the same directory as my XML pages, but the Back history contains a number of blank.html pages, instead of the XML pages themselves. This problem doesn't appear in Firefox, which handles the AJAX pages perfectly. Hooray for standards compliance!

Oh, and I've also noticed that if you use a default value when no hashed value is given, you end up with a nasty little problem. If you go through a few links on an XML page starting from a URL without a hash, and then try to go backwards, the Back button stops on the non-hashed page, which bounces forward to the default value. You can still navigate back using the dropdown from the Back button, but when you get bounced, the Forward history disappears. I've fixed this by not using a default value, and it works fine now.

All in all, I'm quite happy with this code and want to say thanks!