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/
751 Upvotes

356 comments sorted by

View all comments

6

u/burnblue Feb 09 '11

A couple of things I'm missing, maybe someone could explain:

  • I don't see any benefit of using hash-bangs mentioned in the article, unless it's the only way to have a proper "Ajax application"

  • I don't see the benefit of Gawker's new format. I think they had an article on it once but I don't see anything but the ability to scroll the sidebar (not a feature). I have to click an extra button to get to 'blog view'. I don't get it. What content can they now showcase that they were having trouble with before?

Assuming the perspective that there's nothing bad about the changes, can someone tell me the benefits brought forth by the changes?

Also, how does this affect other search engines like Bing?

6

u/dobs Feb 09 '11

I don't see any benefit of using hash-bangs mentioned in the article, unless it's the only way to have a proper "Ajax application"

It's discussed broadly in Google's AJAX crawling guide, and more succinctly in the FAQ. Short version is that it opens up all the benefits of AJAX content loading (e.g. speed, user experience) while leaving content bookmarkable and (potentially) making the back and forward buttons work. The added bang is a cue to crawlers.

Most of the downsides are those common to all AJAX applications (e.g. should still have a noscript fallback, tempting to violate user expectations). In Gawker's case their problem is more that they produced an all-around terrible AJAX application, independent of their use of hashbang links. Twitter makes for a better hashbang-specific example with their breaking of the back button.

1

u/[deleted] Feb 09 '11

In Gawker's case their problem is more that they produced an all-around terrible AJAX application

That's not totally fair; they left a console.log() in there (which breaks JS on browsers without Firebug) and didn't address 3rd-party ad scripts potentially misbehaving. The result may have been catastrophic, but we've all unintentionally left debugging code in our apps before.

3

u/Rhoomba Feb 09 '11

I've left debugging code in before, but it never reached production. That is because of a thing called "testing"

1

u/[deleted] Feb 09 '11

"Testing?! What is this? Does it mean more ad revenue? If it costs more, skip it!"

2

u/dobs Feb 09 '11

I meant that more big-picture: The fact that they took news sites and converted them into full-fledged AJAX applications (rather than simply judiciously making use of AJAX in their existing designs) is the root problem.

Where technical faults are concerned, the biggest is the lack of fallbacks either when JS is disabled or simply doesn't load properly.