Alex Rivera | Logout

Why is JavaScript considered bad by some?

Asked 2009-05-25T14:21:44.053
11

Why is JavaScript allowed to be disabled in the browser? (i.e. Why is it considered bad?)

Edit
Report

4 Answers

7

Historically it has been a huge security problem for web based services. Also with any technology that is exploitable and has a low technical barrier for entry it ends up the tool of the low brow trouble maker (script kiddies). Quick searches for javascript or xss in a security exploit database will show hundreds of pages of vulnerability.

answered 2009-05-25T14:28:09.827
6

JavaScript is often considered dangerous or at least annoying for two reasons:

  • Websites can suddenly do stuff that you don't want them to do, e.g. open popups
  • Websites can suddenly keep you from doing stuff that you want to do, e.g. disabling right-clicks

Now, in the vast majority of cases JavaScript is harmless and can really enhance the user experience (Ajax comes to mind). But all it takes is one malicious site that uses JavaScript to do evil (TM) things like Cross-site Scripting. For that reason it is commonly considered best practice to disable JavaScript globally and to allow it for just those sites or domains that you explicitly trust. In this day and age being paranoid on the Internet is actually a good thing.

answered 2009-05-25T14:31:48.790
2

Because it shifts load from the server to the client and there is no way to control to what extent.

I work with Javascript every day and respectfully acknowledge what it has made possible, but sometimes when I browse a very simple page, and the interface reacts lightning fast because there is nothing to render but pure, simple HTML, I think that that used to be the original purpose the purpose of the internet. You can, and I am exaggerating only little, browse these pages with a 600 MhZ Pentium with 128 megabytes of RAM without problems. While for a Javascript-heavy, effectful "rich" website, you need massive resources on the client side for a halfway smooth experience, and you need to update your equipent almost as often as gamers do.

Also, I generally feel some, not hostility, but slight annoyance towards Javascript because it massively increased development costs by adding a host of incompatible target platforms, version, obscurities and specialties to cater for, as well as a generally bug-prone, hard to debug and volatile environment to work in.

That said, I think the industry owes the creators of JQuery, Prototype and the likes big, big thanks, among many others.

answered 2009-12-06T04:33:11.027
1

There are a few rare instances where JavaScript can be dangerous (but so can anything, including the massively ubiquitous Flash). The reason users actually do disable it or use addons like NoScript is largely unjustified paranoia.

In the end, users don't stick with behavior that breaks the websites they want to experience. So, I wouldn't expect JavaScript paranoia to be a long-term issue as only more and more sites depend on it (like this one).

It's similar to the hype we saw around cookies several years ago.

answered 2009-12-06T03:05:01.590

Your Answer