JavaScript: Why You Don't Know More About It
Subject:   I leave javascript disabled like a growing number of others
Date:   2001-05-18 12:46:32
From:   tz
There was some study showing that the number of browsers with javascript on or active went DOWN over the last year. It is still a minority, but over 20% Don't use it. I think a large majority of the rest are probably irritated by it. All those pop-up ads, modal dialogs, or having your browser crash when going to certain pages tends to make it a harm rather than a help.

You should start with an article with "Why should you NOT use javascript?". Here is a partial list:

1. NEVER EVER use javascript to replace a standard HTML form with submit. You won't be able to validate everything, and you will consume more bandwidth sending the code to attempt to do so and just irritate users with either something that doesn't work or annoy (e.g. despite what your stupid modal dialog says, my areacode is really that, they recently changed it so your 60k list of states v.s. area codes is out of date).

2. NEVER EVER use javascript to pop up a new window. The only exception is if there is some very special process that the user can't do using an ordinary link "Open link in new window". Given all the annoying banner ads I can understand why people are turning javascript completely off (I once had a site pop open a half-dozen porn sites and an equal number of banner ads then crashed my browser when I mistakenly left it on, and the originating site didn't sound like anything wierd).

3. NEVER EVER use javascript to do something like navigation that can be accomplished with normal HTML. Your site should work as well as possible with browsers that have Javascript turned off. When you have that working and have something that cannot be possibly done in any other manner, maybe consider using javascript.

4. If you want people with a browser other than Internet Explorer for Windows access your site, don't used Javascript. Netscape (4.x) often crashes, OmniWeb isn't fully functional, lynx and wget have no support, and you shouldn't use anything you can't test on these platforms. Of course you should test Mozilla and NS 6.0. I don't know about opera or the web appliances but they should be tested too. If you really want to not work with anything but Microsoft, just make your entire site an Active-X application and be done with it.

Basically if I have trouble with a site, viewing the source usually shows up some Javascript that is actually broken or (that I've) disabled, and I send a nasty message to the Webmaster if I can't navigate the site.

As long as browsers don't let me control my browsing with Javascript on, it will remain off OmniWeb has a pop-up only in response to user interaction option, and I can bring up the navigation bar even if the script window has it off by default.

And despite your article's title, 90% of the javascript I've encountered falls into one of the above 4 exclusions - popping up an extraneous window that I didn't want or would have preferred to be in the current browser window, duplicating the function of an ordinary SUBMIT, often without any checking, or crashing or causing some other problem (e.g. blank screens - like the case statement with IE and NS only and it just sits there if the browser doesn't exactly match the absolute latest internet explorer or netscape).

I may be sorry for the other 10% of the sites that might actually work better with it, but the sooner this goes away, the better my browsing experience will be.

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • That really makes me angry!
    2002-07-27 09:39:57  mattstanton [View]

    All you've really done there is criticise certain uses of JavaScript. I'd agree with you that those kinds of applications are irritating, but this doesn't seem to warrant condemnation of an entire language. I mean, Delphi is responsible for a lot of computer viruses, but I've never heard of anyone saying that Delphi is a waste of time because it can be abused in such ways.

    You seem to be unaware of the benefits of JavaScript to many internet users. Take me, for example. I'm an ESL teacher, and I spend a lot of time programming in JavaScript to produce online interactive quizzes and tests that my students can use to review or get extra language practice. Take a look at my website to see what I'm talking about:

    The form validation capabilities that are the essence of JavaScript just happen to be ideally suited to the kinds of things I want to do. Students can access a quiz from their home or school/college and get instant feedback right there and then. I could use a CGI, but being server side it's slower, and with JavaScript I don't have to worry about unpacking the query string etc. Moreover, students can terminate their connection to the internet after the page has loaded. This is a priceless difference for those in poor countries using a dial-up connection.

    Flash or Java applets are other options, but why use a chainsaw to open a tin of beans?

    Despite having read the article, you seem to remain under the impression that JavaScript is just a tool to spice up webpages. I hope you'll now appreciate what a wonderful educational tool it can also be.

    By the way, according to my tracking stats, only about 4% of my visitors have script disabled.

  • I leave javascript disabled like a growing number of others
    2001-05-19 08:08:54 [View]

    While I agree with tz's assessment that JavaScript can be abused, and that many sites don't test their pages on enough different browsers, and even that many uses of JavaScript (such as overriding built-in browser functionality like the anchor tag, which I personally abhor) fall more properly into the category of "misuse", I still don't see anything in his response that suggests that the problems are with JavaScript itself. They are, rather, problems of people not knowing how best to use JavaScript, or simply not caring if they alienate their audience (due to misguided and probably shortlived attempts to squeeze the last ad banner impression out of their network).

    The complaints raised with respect to poorly implemented forms validation, for example, are problems of implementation, not with the language itself. Forms can most certainly be enhanced by JavaScript; just because some people simply don't go far enough for your tastes is an argument for more education, not for abandonment of the language.

    You are saying, in essence, "some people use JavaScript when I don't want them to" and "some people don't use JavaScript well enough when I want them to" and "some people can't see the amazing potential of JavaScript for functionality X". All of these are arguments for further education, not for the abandonment of the language.

    And though I'd be delighted if I could simply write an article that began, "Hey, all you porn site operators - knock it off with all the popup consoles" and be heeded, I don't think anyone has that sort of power.

    Finally, I'd like to add that all of the uses you mention (forms validation, popup windows, navigation) are ways of "enhancing" traditional Web sites, and don't begin to cover the more advanced possibilities inherent in the use of JavaScript and Dyanmic HTML for client-side applications. Bob Stein's Visibone ColorLab (, for example, is an amazing DHTML tool for Web designers, which lets them pick colors and compare and contrast them with others, using a completely dynamic, client-side application. You won't find this on a "traditional" Web site, standing in the way of navigation or popping up from a porn site. The application is the whole point of the page, not "enhancing" your "experience" with a bunch of half-implemented, barely tested, ill-applied JavaScripts.

    On the other hand, though, some traditional sites are making what I would call good use of JavaScript and DHTML. MSNBC, for example, uses DHTML to provide more information about some of its stories, with interactive charts and sidebar animations.

    Making the decision to disable JavaScript is certainly an easy one to make, and there are many reasons why you might wish to do so. But none of them, in my mind, justify turning it off for good.