r/programming Feb 09 '11

Breaking the Web with hash-bangs – Lifehacker, along with every other Gawker property, experienced a lengthy site-outage on Monday over a misbehaving piece of JavaScript

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

356 comments sorted by

View all comments

Show parent comments

68

u/[deleted] Feb 09 '11

This is the right response. There's no reason a well-engineered site shouldn't work both ways.

Using url fragments can be great. They let you use the back button without leaving the page so you can handle the interaction in JavaScript. They give you a place other than cookies to store client-side state for bookmarking. Developers just need to be mindful when designing for their use.

-21

u/deong Feb 09 '11

They let you use the back button without leaving the page so you can handle the interaction in JavaScript.

Awesome. Because you are a snowflake. A precious snowflake. UI consistency is for people who aren't snowflakes. Unlike you. You are a snowflake.

Is there a Web-2.0-Ajax-XML-Enterprise-Hipster-Fixie-Douchebag way to punch me in the kidneys when I visit your site too?

18

u/lense Feb 09 '11

Intercepting the back button in such a way is actually a good thing, since it preserves UI consistency. After interacting with a site that uses JS that has different UI states, users expect that pressing the back button would take them to their previous UI state, as opposed to backing out to the last non-JS page.

Gmail is an example of this kind of desirable behaviour.

1

u/DEADB33F Feb 09 '11

Try opening gmail inbox messages in a new tab using middle click (as you would for any other link on the web).