AJAX plus history

Damn. Sometimes people come around and do something really innovative that you should’ve already done yourself, you know? (What a haughty thought that is, huh?)

This OnJava article about adding history support to AJAX apps is one of these things. The idea is pretty simple, use hashes to keep track of what you’ve done and where you’ve been (there’s of course some serious considerations for most scripts–if you create something, you need to make sure you don’t recreate it and so forth for destroying).

A while back, I wrote this page to handle pagination issues (and come to think of it, this is sorta inspiring for a WP plugin…). Anyhoo, that page demonstrates the same principle of using hashes to respect browser history states.

Essentially you take advantage of JavaScript’s ability to parse the incoming request’s location.hash to determine which events should be played out.

I’ll save Lizzy the time and just yell nerd right now: Nerd!

This entry was posted in programming, web, xml. Bookmark the permalink.

One Response to AJAX plus history

  1. Lizzy says:

    :) You’re so good to me, Dollface. Always trying to make things a little easier for me. :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree