KillerSites Blog

JavaScript: how important is it to web design?

February 22, 2005

Short answer:

JavaScript is not very important when you look at it from a practical perspective.

OK, why?

Simple really- about 10% of the people on the Internet have their JavaScript turned off – they’re afraid that it might pose some security risk.

Even though that fear is unjustified, the fact remains that you can’t depend on JavaScript working for a significant audience. That means you can’t use JavaScript for any critical work on a public website.

– –

I use JavaScript mainly for HTML form validations (ex: check if the email address entered, is probably an email address etc.)

But again, if you want to make sure that the form is being filled in properly, (because JavaScript can be defeated,) you will still have to use a server-side script (something like PHP or ASP etc,) to be sure…

When can you use JavaScript with confidence?

The best case scenario is when you have total control over which browser people use – this is rare indeed.

Don’t get me wrong, I’ve used JavaScript to create some interesting pieces of software.

For example:

I created an HTA (Hyper Text Application) where I used DOM scripting to create a PowerPoint slide picker application.

Using just JavaScript, I was able to create a rich user experience where people could search for and select ‘slides’ from a database, and then with just a click of a button, the program produced a ready to go PowerPoint presentation (using Windows’ COM automation*) right on their desktop.

This program was run on a CD and was for internal use at a very large corporation – I had total control over the running environment, so I was able to really put JavaScript to the test.

The point:

Before any of you JavaScript nerds send me nasty emails …

I’m not just discounting JavaScript out of hand, or without having considerable experience. Rather, I know from experience that web designers would be much better off learning other things … say PHP.

*Microsoft provides a COM interface that even JavaScript can hook into.

Stefan Mischook