“Hash mark killed the question mark star” or “Ajax Permalinks”

Do a search on Google maps. Type in “San Francisco, CA”.

Notice how the URL doesn’t change?

Now do a search on Yahoo maps. It instantly gives you a nice new permalink.

Notice there’s no question mark in that URL?

They ditched the question mark and just used the hash mark to note the beginning of the query string.

Enter SmugMug and their recent Ajaxification (demo).

I don’t know why but all the pieces are finally put together for me. Just ditch the question mark and use the hash mark to denote query parameters and you can rebuild Ajax state and give the user a permalink.

  1. Cute.
    What’s wrong with using a question mark?
    Developers can’t “just ditch” the question mark – they could follow these two examples of rich client interactivity, but the resources being retrieved behind the scenes will still be unique and can’t use the hash mark. The hash mark is a ‘fragment identifier’ usable client-side only.
    But you knew that.

  2. This is what I did with the Really Simple History library: http://codinginparadise.org/projects/dhtml_history/README.html Its been around for about a year and a half and is under a BSD license for folks to use. Google is using this internally, BTW.


  3. Rebuilding your page via AJAX using #fragment state is a nifty trick, but could make your pages much less search- and archive-crawler friendly. If they don’t see the meat of the page without executing Javascript — which most don’t — that content can’t be indexed or saved for posterity. Just a head’s up.

  4. Hey Gordon.

    That’s a good point. A spider wouldn’t specific the hash mark when it requests the URL so the HTTP server wouldn’t even see it so you’d need to construct the page on the client via Ajax.

    I guess we’re back to where we started :-/

    This would break Tailrank too…

    There needs to be a browser API that just sets the URL string in the browser WITHOUT performing any action so that you can update the state and still preserve the permalink.


  5. sanzon

    AJAX is wonderful is used correctly, but I feel AJAX is best used along side with your standard querystring.

    Hashmarks limit navigation plus searchability. Now granted these will change in time, but there are still many times when querystrings are highly useful. So I totally agree hashmarks are great! The current site I’m working on uses hashmarks, but at the same time I use a ton of querystrings as well.

    It simply depends on the situation.

%d bloggers like this: