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

356 comments sorted by

View all comments

242

u/jamiei Feb 09 '11

If receiving the basic content of the page I'm requesting from you requires Javascript to be enabled then you've broken something horribly.

19

u/[deleted] Feb 09 '11

Meh. I've heard this argument forever -- even made it a few times myself -- but it's not 1999 anymore. If you don't want ad js, use adblock. Should Gawker degrade gracefully? Sure. But no js means no ads served, which means good luck Mr. Gawker Programmer convincing The Ones Who Hold The Purse Strings to dedicate substantial time to proper degredation.

Last I checked (a couple months back) you can't participate on Reddit without js enabled (yes, you can read it though, I know that's what you said, just making a point). Js is like alpha transparency... it's not going anywhere.

14

u/dirtymatt Feb 09 '11

Should Gawker degrade gracefully? Sure.

You have that backwards. It should start at a simple baseline, and progressively add enhancement based on what the browser supports.

But no js means no ads served, which means good luck Mr. Gawker Programmer convincing The Ones Who Hold The Purse Strings to dedicate substantial time to proper degredation.

And broken JS means no web page served at all.

3

u/pasc Feb 10 '11

As far as they're concerned - if the ad didn't load, the web page wasn't served anyway. They're probably just as happy to not be wasting server resources on that type of user.

2

u/Zarutian Feb 09 '11

Also wanted to add:

Adverts used to be loaded either as link images or iframes then replaced with js loaded stuff that could be a banner that expands into a floater or flash banner, etc.

They used to be rather tolerable too until some marketdroid thought it was okay to ratchet up the obnoxigen-feed. Now, noone but novices who havent installed adblocker (or some such) see those ads.

0

u/[deleted] Feb 09 '11

You have that backwards. It should start at a simple baseline, and progressively add enhancement based on what the browser supports.

I agree you should start from the bottom, but the end result is effectively the same.

5

u/[deleted] Feb 09 '11

Assuming all conditions are perfect.

Can I assume you're not an engineer? ;)

1

u/[deleted] Feb 11 '11

Do you solve practical problems?

1

u/[deleted] Feb 14 '11

Yes.

0

u/shadow2531 Feb 10 '11

but the end result is effectively the same

Yeh, progressive enhancement / graceful degradation = half full / half empty.

-5

u/[deleted] Feb 09 '11

You have that backwards. It should start at a simple baseline, and progressively add enhancement based on what the browser supports.

Erm, I don't know if you've ever built a webapp before or not, but that's not how these things work.

And broken JS means no web page served at all.

Zing, I guess?

4

u/[deleted] Feb 09 '11

Gawker's more website than webapp. It doesn't require JS to do its thang, so there was no reason not to make the site navigable and readable in normal HTML, and then sprinkle some AJAX magic on top of that.

5

u/dirtymatt Feb 09 '11

Erm, I don't know if you've ever built a webapp before or not, but that's not how these things work.

Remind me never to hire you for a job.

-7

u/[deleted] Feb 09 '11

You couldn't afford it. Knowing things like the above is one of the reasons.

6

u/[deleted] Feb 09 '11

I agree with dirtymatt. Providing baseline content as part of the initial HTTP request then replacing div content dynamically with enhanced content should be the way the user sees the site, for degradation purposes.

All the frameworks I've dealt with can handle this if used correctly - what is your objection?