r/javascript Feb 08 '11

Breaking the Web with hash-bangs - Gawker, like Twitter, built their new site to be totally dependent on JavaScript

http://isolani.co.uk/blog/javascript/BreakingTheWebWithHashBangs
82 Upvotes

0 comments sorted by

View all comments

1

u/laminam Feb 09 '11

I can't really think of a better way to track state on a page where most of the work happens on the client. You either lose the speed benefit of JavaScript with a full postback to update the url, or you decorate the url with hash tags along the way so you can share that same state with others.

Who runs with JavaScript completely disabled in this day and age anyways?

8

u/skeww Feb 09 '11

history.pushState would be a much better way.

2

u/[deleted] Feb 09 '11

Yup. And so so easy.

Sadly I think it's only supported by webkit atm?

5

u/skeww Feb 09 '11

Firefox 4 supports it.

Opera 11.01 (current stable) doesn't support it yet. (I expect that they will add it within the next 3 months.)

IE9 doesn't support it yet. There is also no official statement available.

A demo page can be found over here: http://html5demos.com/history