JavaScript and where it had led us to
Since Netscape introduced JavaScript in 1995, this scripting language had its user based skyrocketed. Back in the days, many of us had to write the script by ourselves. In the Web 2.0 world today, most of us simply click and drag to have JavaScript embedded on our sites. It used to be a good thing, but nowadays JavaScript has become an annoyance.
I have to clearly state right now, so I won’t be misunderstood, that I have nothing against the language itself. But I have a major problem with the way it’s being used in the real world.
As a former web developer (though I still develop websites, I don’t do it professionally), I have a track record of developing JavaScript free sites. The reason for this is that I believe that a visitor has to be able to navigate a website whether they have a JavaScript enabled browser or not.
Why anyone in this day and age would be using a non JavaScript enabled browser, you say? Well, where have you been?
Firstly, JavaScript is the one helping sites popping up those unwanted ads (Annoying). Secondly, if you are on Microsoft Windows, JavaScript can and will inject a Trojan into your computer. Thirdly, mobile web is the trend. I’m not talking about people on the move with their laptops, but people who are accessing sites on their mobile phones. The last and the most significant of all is that data mining is on the rage. Do you know that those ad banners you see and many websites help companies like doubleclick to keep track on what sites you are visiting?
The way I see it, a visitor should be able to get whatever they are looking for on a website regardless the medium they are using to access it. Would it be a text based browser like lynx, an old Internet Explorer on Windows 98 (Honestly, people are still using these!), web browser on a Blackberry, or a Safari on the latest Macbook Air. Don’t you think so? Or are you going to discriminate some of them?
Of all the bad decision you can do as a web developer is to have your navigation bar a JavaScript bar. I know it’s pretty to have a menu slides down as a visitor hover on it, but if a non JavaScript enabled browser used to access it, the visitor won’t be able to navigate properly or at all.
If JavaScript is unavoidable, you are responsible to create an alternative, non JavaScript version of the site. That’s what Gmail has been doing quite well. As soon as Gmail detects some problem, it would offer a HTML only version.
Also, if you are on Firefox, you may want to check http://noscript.net/. It’s a plug-in that will allow you to choose whether to enable JavaScript on given websites.