Hashbangs, useful, but probably not what you want

In the modern web AJAX is the workhorse behind the interactions. CSS3 might add the shine but AJAX is still doing the work. The strength of AJAX is that it's a background request, the UI will ignore them completely, which is fantastic unless you've just ripped out the hole page content and replaced it with another one.

To enable the user to track that changed state you need to change the URL, and this is where hashbangs come in. Hashbangs are a work-around. But Hashbangs are an old workaround for an old problem.

Where previously we only has window.location available to us we now have the history API, window.history.

Use pushState to add states and watch for the popstate event to revert to previous states.

One final caveat, if you are updating only a region of your page then a hashbang may still be valid for you. The hashbang URL must convert into a querystring URL for search engines to parse the content. They expect only the changed content to be returned when they visit that converted URL.

Resources

Flickr gallery

Background. The main problem I have with my own site is filling it with content. An idea I had was to take pictures on my camera phone and put them somewhere on the web and load them from that remote source. The original galley used Blogger and was far from perfect.

Flickr. My new gallery uses Flickr. Using the Flicker API I retrieve a list of the 8 most recent pictures and display the title, date and appropriately sized version of the picture on the page. I've also added the Lightbox2 script, it's a straight implementation but I'm planning on changing the handler so non javascript users will go to the flickr page rather than the image directly.

External links. Flickr :: Flicker API :: LightBox2