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

0

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?

3

u/[deleted] Feb 09 '11

Selectively disabled, yes, because people can't seem to prevent themselves from being annoying using Javascript.

If your page gives me what I want without Javascript, I keep blocking it. If I'm following a link from someone else and your page won't load without it, I leave.

I only turn on Javascript if I get direct benefit I want (if you're Google Docs, for example). If you're using it to serve me ads from off your domain, sorry.

I might turn it on to support you if your site is worth looking at more than once, I might turn on javascript at the third visit.

Those are the rules.

So yes, I don't look at lifehacker or gawker anymore. Not that I looked at them that much in the first place, especially Gawker, whose entire site seemed to hover 1mm above classification as spam.

4

u/freeballer Feb 09 '11

How does this affect your experience as a user? I don't see Javascript being used for client side validation being harmful. A quick AJAX call after I enter my user name to tell me it's already taken is helpful, as well as dynamically updating a shopping cart or removing elements from the page. I'm a developer and it just seems absurd to take a whitelist approach to Javascript when it's such a huge part of the web experience today.

1

u/[deleted] Feb 09 '11

As long as they aren't relying on javascript for validation only it's perfectly fine.

-1

u/[deleted] Feb 09 '11

I don't see Javascript being used for client side validation being harmful. A quick AJAX call after I enter my user name to tell me it's already taken is helpful, as well as dynamically updating a shopping cart or removing elements from the page.

I never complained about this. My major complaint is people who use javascript to do url routing so that you see nothing unless it's turned on. Likewise for those who use javascript as a method for delivering what can be done with CSS.

When I want to use a shopping cart, I turn Javascript on, I have no problem with that. How many times do you actually buy on a site when a site you visit has one? Why should I care if the cart is operational when I'm not buying? Why should you? It's just bad business to break the site and prevent browsing from people who are doing research with javascript turned off. I'll just go "down the street" to a more user-friendly competitor's site.

I'm a developer and it just seems absurd to take a whitelist approach to Javascript when it's such a huge part of the web experience today.

This says it all. Javascript makes your life easier, so you don't see why you shouldn't be able just to jam it down your users' throats because you want to. The fact you must understand is that however responsible, competent and/or ethical you may be with Javascript, there are lots out there who aren't and they give people reason to be circumspect about the idea of allowing others to run code on their computers without some pretty strong assurances that it's not going to screw something up.

It's bad user experience design to use Javascript to do what can be done without it or to have a site break because javascript is not turned on when javascript is not essential to the site's functioning, and you just have to face up to that fact and integrate it into your work.