Bookmarks and back button history for AJAX apps
Aside from the accessibility concerns, which are indeed serious, the biggest problem with single-page AJAX applications (Web apps that work largely or entirely within a single page, like GMail) is that the standard navigation tools provided by Web browsers — bookmarks/favourites and the Back/Forward buttons — become totally useless.
Really Simple History is a script that lets you associate page anchor names with application states (e.g.
page.html#state). The script works by linking the user to a new anchor whenever the application enters a new state (e.g. editing a blog entry). The script then watches the current URL for changes to the current anchor (due to back/forward navigation), and triggers a function you specify so that you can update the application state accordingly.
Obviously it’s not quite as simple as I make out, but with the library in place, the code you need to write to support this is actually surprisingly simple. For now, Safari isn’t supported, but looking at how it works, I wouldn’t be surprised to see that browser supported before long.
Hopefully the large AJAX Web applications like GMail will lead the way by adding this to their offerings quick-smart. Now that proper bookmarking and navigation is now possible within single-page AJAX apps, I wouldn’t object quite as strongly to the notion of developing my next Web application ths way.