Web Matters

What – no Javascript?

It often comes as a surprise to web-developers that many people disable Javascript while browsing the web. In fact it is such a surprise to some that they deny it happens, or insist that the only people who do it (or who do not have Javascript available in the first place) are a handful of cranks who can safely be ignored. That is not the case, and this page explains why not.

Among the reasons for disabling Javascript are the following.

  1. Security

    Internet Explorer is riddled with security holes, many of them related to Javascript. Experienced security consultants not infrequently recommend that users of IE should always disable Javascript. True, users of browsers such as Opera and Firefox, which have a pretty good reputation on the security front, don’t have to worry quite so much about this. But why take chances unnecessarily?

    People have for example been stung with enormous telephone bills – €1000 or more – due to illicit dialing software surreptitiously installed on their systems by web-sites. Even if the security holes which enable this sort of operation are not in Javascript itself, Javascript can be used as a tool to exploit security holes elsewhere.

  2. User interface abuse

    Web authors use Javascript to do all sorts of irritating things, that many readers would prefer to be without:

    • Pop-ups: these are occasionally useful but usually a nuisance.
    • Distracting animations and sounds.
    • Disabling the ‘back’ button or scroll-bars.
    • Disabling the highlighting of the active link, thus making it impossible to navigate the site using a keyboard.
    • Accessing new data after some minutes, so the page triggers a new dial-up attempt. (Again: sometimes useful, but usually a nuisance. I’m perfectly capable of clicking ‘reload’ if I want new data.)
    • A particularly irritating action is carried out by numerous frame-based sites if you arrive directly at a page via a search engine. They use Javascript to force the visitor to go to the opening page/frameset of the site. This means of course that the information you were looking for is nowhere to be found: this is on its own a good reason to disable Javascript for anyone who uses search-engines much.

    This list is by no means exhaustive: some pages use Javascript to do things so weird that it’s not easy to describe them in a few words.

  3. Junk filter

    I have noticed a positive correlation (imperfect though it undoubtedly is) between sites which are Javascript-dependent and sites whose content is a complete waste of time. If you are quickly scanning a number of sites looking for something, and one comes up blank with Javascript disabled, then there is quite a good chance that this is a site which you don’t need to spend any time on.

Quite apart from people who have discovered the points given above, there are plenty of other visitors without Javascript. Disabled people using text-based browsers have no Javascript. Few, if any, search engines have Javascript – nor is there any reason why they should. Some organisations run, for security purposes, a web proxy which strips out some or all script (some public libraries for example). And script is not available on some browsers for the new small-screen devices: web-enabled phones and palm-tops.

Estimates vary as to how many visitors browse without Javascript. But in almost every case I have come across where someone has actually tested how many visitors have script disabled, the figure has been at least 10%.

This does not mean, as some of my readers seem to have thought, that I am telling you to avoid using Javascript. But use it for non-essential enhancement of the user interface, not for essential content. True, there are types of content which require script, and they are increasing. But these still only make up a small fraction of the pages on the web. And even here there is no excuse for presenting a blank page to the user. Supply the basic text of the page as standard (X)HTML and then add a noscript element explaining why Javascript is needed for the rest.

So if you are browsing the Web, there are reasons aplenty to disable Javascript, particularly when visiting unfamiliar sites.

And if you are authoring a site, and make it unreadable without Javascript, you are shooting yourself in the foot.