AJAX Makes Javascript Suck

Published at 18:12 on 1 December 2013

Probably the biggest reason Javascript-infested websites suck so mightily is AJAX. Every GUI widget no longer simply operates local to the browser; in the background things are talking to the server for every little thing you do. This makes pages act erratically if your Internet connection is anything less than rock-solid and high-speed.

Making matters even worse is the tendency for JS-infested pages to re-invent the wheel. Instead of using standard buttons and other widgets, it’s all implemented from the ground up in Javascript. Unlike the standard widgets, these JS ones violate the look and feel of what the rest of your computer is doing.

Add that to the erratic behavior that AJAX causes with anything less than optimal network connectivity, and you have a recipe for an unusable web page. Do I need to click on that widget or not? One click or two? Does its color indicate it active, or disabled? Did the click I made register, or did AJAX make it vanish due to network flakiness? Or is the response just delayed? Oh, it did something! Was that my first click (with an unwanted second response coming when the network catches up), or my second one? And so on, and so forth.

Mind you, I’m not saying “never use Javascript”, just “use Javascript with great caution, and only when there’s no other way to do what you want (and are you sure it has to be done in a way that requires Javascript in the first place?)”.

Javascript’s proper place is as a seldom-used last resort, not as a commonly-used first one. Browsers work best when they run functional and descriptive code such as HTML and CSS, not procedural code such as Javascript. They also work best when user interaction is handled “off-line” (i.e. completely locally by the user’s computer), not “on-line” in an AJAX fashion.

Comments

  • these new age idiots have destroyed the entire internet with this garbage. not too mention help all these f$%^% CEO’s make oodles of money selling everyone’s data and info i can not stand it! i block 99% of all javascript.

Leave a Reply to blackcap Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.