Just a Safari fragment identifier history demo…

See a demo of HistoryState, my new history and storage script.

This page demonstrates a Safari-compatible fragment identifier-based history system. It works using magic (and by "magic", I mean that it works by using document.body.scrollTop, and a lot of hacks). For more details, see this page: How it works in Safari.

I've added support for most other browsers to this page as well. My plan is to try to hack together a system that works as well as possible in as many browsers as possible. Once I have compatibility down, I'm going to focus on optimizing the code so that it can be ready for real-world use.


Demo:

Value from fragment identifier:
Change value…

Tested browsers:
All of these browsers have been tested and work with this script without any major problems. The version numbers here are just the ones I tested. If you get this to work in a different version of one of these browsers, let me know.

Known Safari issues:


by david bloom.
blogs that link to this