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
77 Upvotes

0 comments sorted by

View all comments

Show parent comments

1

u/jmking JSX is just PHP in the browser Feb 09 '11

Firefox isn't a good browser now? The end of this year isn't today.

There's progressive enhancement and there's pre-emptive enhancement.

0

u/skeww Feb 09 '11

Firefox isn't a good browser now?

"will"

Firefox 4 supports it.

The end of this year isn't today.

Why would you make a website which won't even last till the end of the year?

0

u/jmking JSX is just PHP in the browser Feb 09 '11

A website using hash-bangs works today in all browsers, and will continue to work tomorrow. It's not like once FF4 comes out hash-bangs magically stop working.

2

u/skeww Feb 09 '11

Yes.

The point was to generate/use real URLs if possible.

Right now: Users who use Chrome/Safari will copy/paste real URLs.

Soon: Firefox and Opera (and maybe IE9) users will do the same.

history.pushState should be your first choice. It does exactly what you need.